{"action":"closed","issue":{"url":"https://api.github.com/repos/emberjs/data/issues/5328","repository_url":"https://api.github.com/repos/emberjs/data","labels_url":"https://api.github.com/repos/emberjs/data/issues/5328/labels{/name}","comments_url":"https://api.github.com/repos/emberjs/data/issues/5328/comments","events_url":"https://api.github.com/repos/emberjs/data/issues/5328/events","html_url":"https://github.com/emberjs/data/issues/5328","id":289582940,"number":5328,"title":"unloadRecord after v2.12","user":{"login":"Vincz","id":400525,"avatar_url":"https://avatars1.githubusercontent.com/u/400525?v=4","gravatar_id":"","url":"https://api.github.com/users/Vincz","html_url":"https://github.com/Vincz","followers_url":"https://api.github.com/users/Vincz/followers","following_url":"https://api.github.com/users/Vincz/following{/other_user}","gists_url":"https://api.github.com/users/Vincz/gists{/gist_id}","starred_url":"https://api.github.com/users/Vincz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vincz/subscriptions","organizations_url":"https://api.github.com/users/Vincz/orgs","repos_url":"https://api.github.com/users/Vincz/repos","events_url":"https://api.github.com/users/Vincz/events{/privacy}","received_events_url":"https://api.github.com/users/Vincz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-01-18T10:45:08Z","updated_at":"2018-04-06T22:15:05Z","closed_at":"2018-04-06T22:15:05Z","author_association":"NONE","body":"Hey :)\r\n\r\nI have this simple piece of code (removing record from the store while notified by a websocket).\r\n\r\n```\r\nhandleRemove: function(content) {\r\n        var store = this.get(\"store\");\r\n        for (var model in content) {\r\n            if (!this.get(\"ignoredModels\").includes(model)) {\r\n                var modelId = content[model][\"id\"];\r\n                var object = store.peekRecord(store.convert(model), modelId);\r\n                if (object) {\r\n                    object.unloadRecord();\r\n                }\r\n            }\r\n        }\r\n    }\r\n```\r\n\r\nIn ember-data 2.12 everything works as expected. \r\nBut after this version, I'm unable to track the origin (if someone know how to do it ?), but the store tries to re-fetch some unloaded models (and fail with a 404 from the server).\r\nI'm also encoutering sometimes the `Cannot read property 'eachAttribute' of null ` error that others seems to have on unload.\r\n"}}
{"actor":{"display_login":"runspired"}}