{"action":"opened","issue":{"url":"https://api.github.com/repos/adonisjs/adonis-framework/issues/195","repository_url":"https://api.github.com/repos/adonisjs/adonis-framework","labels_url":"https://api.github.com/repos/adonisjs/adonis-framework/issues/195/labels{/name}","comments_url":"https://api.github.com/repos/adonisjs/adonis-framework/issues/195/comments","events_url":"https://api.github.com/repos/adonisjs/adonis-framework/issues/195/events","html_url":"https://github.com/adonisjs/adonis-framework/issues/195","id":161897217,"number":195,"title":"Inconsistency when accessing relation data between views and code","user":{"login":"gabe-alex","id":2676337,"avatar_url":"https://avatars.githubusercontent.com/u/2676337?v=3","gravatar_id":"","url":"https://api.github.com/users/gabe-alex","html_url":"https://github.com/gabe-alex","followers_url":"https://api.github.com/users/gabe-alex/followers","following_url":"https://api.github.com/users/gabe-alex/following{/other_user}","gists_url":"https://api.github.com/users/gabe-alex/gists{/gist_id}","starred_url":"https://api.github.com/users/gabe-alex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabe-alex/subscriptions","organizations_url":"https://api.github.com/users/gabe-alex/orgs","repos_url":"https://api.github.com/users/gabe-alex/repos","events_url":"https://api.github.com/users/gabe-alex/events{/privacy}","received_events_url":"https://api.github.com/users/gabe-alex/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-23T11:11:09Z","updated_at":"2016-06-23T11:11:09Z","closed_at":null,"body":"If you want to output data from a related row in a view, you can do `{{ row.related_row.related_col }}`\r\nBut this doesn't seem to work from js code, you need to do `row.relations.related_row.related_col`.\r\n\r\nAslo, slightly offtopic, but `row.relations.related_row` is also `null` if no related rows are found, I think it would be better if it was an empty collection (for multi-value relations), in order to avoid extra checks.\r\n\r\nUsing Adonis 3."}}
{"actor":{"display_login":"gabe-alex"}}