{"action":"opened","issue":{"url":"https://api.github.com/repos/emberjs/data/issues/2711","labels_url":"https://api.github.com/repos/emberjs/data/issues/2711/labels{/name}","comments_url":"https://api.github.com/repos/emberjs/data/issues/2711/comments","events_url":"https://api.github.com/repos/emberjs/data/issues/2711/events","html_url":"https://github.com/emberjs/data/issues/2711","id":54809919,"number":2711,"title":"unloadRecord should check if relationships are fulfilled or just disconnect","user":{"login":"zkwentz","id":4832,"avatar_url":"https://avatars.githubusercontent.com/u/4832?v=3","gravatar_id":"","url":"https://api.github.com/users/zkwentz","html_url":"https://github.com/zkwentz","followers_url":"https://api.github.com/users/zkwentz/followers","following_url":"https://api.github.com/users/zkwentz/following{/other_user}","gists_url":"https://api.github.com/users/zkwentz/gists{/gist_id}","starred_url":"https://api.github.com/users/zkwentz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zkwentz/subscriptions","organizations_url":"https://api.github.com/users/zkwentz/orgs","repos_url":"https://api.github.com/users/zkwentz/repos","events_url":"https://api.github.com/users/zkwentz/events{/privacy}","received_events_url":"https://api.github.com/users/zkwentz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-19T20:43:02Z","updated_at":"2015-01-19T20:43:02Z","closed_at":null,"body":"Given [the following:](https://github.com/emberjs/data/blob/master/packages/ember-data/lib/system/model/model.js#L693)\r\n\r\n```js\r\n/**\r\n    @method clearRelationships\r\n    @private\r\n  */\r\n  clearRelationships: function() {\r\n    this.eachRelationship(function(name, relationship) {\r\n      var rel = this._relationships[name];\r\n      if (rel){\r\n        //TODO(Igor) figure out whether we want to clear or disconnect\r\n        rel.clear();\r\n        rel.destroy();\r\n      }\r\n    }, this);\r\n  },\r\n```\r\n\r\nWe're running into an issue where `removeRecord` is failing when we call `clear` on the relationship, because that relationship is async, and unfulfilled.\r\n\r\nCalling `disconnect` may be the solution, not sure what greater effects that might have. But if not disconnect, then there is a need to check if the relationship `isFulfilled` before clearing."}}