{"action":"opened","issue":{"url":"https://api.github.com/repos/emberjs/data/issues/3029","labels_url":"https://api.github.com/repos/emberjs/data/issues/3029/labels{/name}","comments_url":"https://api.github.com/repos/emberjs/data/issues/3029/comments","events_url":"https://api.github.com/repos/emberjs/data/issues/3029/events","html_url":"https://github.com/emberjs/data/issues/3029","id":71385032,"number":3029,"title":"One-way belongsTo is broken","user":{"login":"BryanHunt","id":504299,"avatar_url":"https://avatars.githubusercontent.com/u/504299?v=3","gravatar_id":"","url":"https://api.github.com/users/BryanHunt","html_url":"https://github.com/BryanHunt","followers_url":"https://api.github.com/users/BryanHunt/followers","following_url":"https://api.github.com/users/BryanHunt/following{/other_user}","gists_url":"https://api.github.com/users/BryanHunt/gists{/gist_id}","starred_url":"https://api.github.com/users/BryanHunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BryanHunt/subscriptions","organizations_url":"https://api.github.com/users/BryanHunt/orgs","repos_url":"https://api.github.com/users/BryanHunt/repos","events_url":"https://api.github.com/users/BryanHunt/events{/privacy}","received_events_url":"https://api.github.com/users/BryanHunt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-27T19:57:37Z","updated_at":"2015-04-27T19:57:37Z","closed_at":null,"body":"If you have a model with a one-way belongsTo, the first time you access the relationship, it works fine.  The second time you access the relationship, you get null.  Here is an example user model:\r\n\r\n```javascript\r\n{\r\n  fullName : DS.attr(),\r\n  manager : DS.belongsTo('user', {async : true})\r\n}\r\n```\r\n\r\nIn the controller, if you call twice:\r\n\r\n```javascript\r\nthis.get('model.manager').then(function(manager) {\r\n  console.log(manager.get('fullName');\r\n  return manager;\r\n});\r\n```\r\nthe first call succeeds, the second call fails because manager is null.\r\n\r\nI debugged this a bit and noticed that the on the first call, inside `BelongsToRelationship.prototype.findRecord`, `this.inverseRecord` evaluated to `true` and on the second call, it evaluated to `false`\r\n\r\nIf you create an explicit inverse, it works correctly:\r\n```javascript\r\n{\r\n  fullName : DS.attr(),\r\n  manager : DS.belongsTo('user', {async : true, inverse: 'directReports'}),\r\n  directReports: DS.hasMany('user', {async: true, inverse: 'manager'})\r\n}\r\n```\r\n"}}