{"action":"created","issue":{"url":"https://api.github.com/repos/emberjs/data/issues/2752","labels_url":"https://api.github.com/repos/emberjs/data/issues/2752/labels{/name}","comments_url":"https://api.github.com/repos/emberjs/data/issues/2752/comments","events_url":"https://api.github.com/repos/emberjs/data/issues/2752/events","html_url":"https://github.com/emberjs/data/issues/2752","id":56315279,"number":2752,"title":"One to one polymorphism: Cannot read typeKey of undefined","user":{"login":"joshpfosi","id":3605462,"avatar_url":"https://avatars.githubusercontent.com/u/3605462?v=3","gravatar_id":"","url":"https://api.github.com/users/joshpfosi","html_url":"https://github.com/joshpfosi","followers_url":"https://api.github.com/users/joshpfosi/followers","following_url":"https://api.github.com/users/joshpfosi/following{/other_user}","gists_url":"https://api.github.com/users/joshpfosi/gists{/gist_id}","starred_url":"https://api.github.com/users/joshpfosi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshpfosi/subscriptions","organizations_url":"https://api.github.com/users/joshpfosi/orgs","repos_url":"https://api.github.com/users/joshpfosi/repos","events_url":"https://api.github.com/users/joshpfosi/events{/privacy}","received_events_url":"https://api.github.com/users/joshpfosi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":29,"created_at":"2015-02-03T00:22:26Z","updated_at":"2015-06-02T19:56:47Z","closed_at":null,"body":"I know there are lots of posts about this already but all seem to either claim its been resolved or involved a one-to-many. I am currently using `ember-data 1.0.0-beta.12` and have the following (simplified) models:\r\n\r\n```javascript\r\n// app/models/user.js\r\nimport DS from 'ember-data';\r\n\r\nexport default DS.Model.extend({\r\n  email:                DS.attr('string'),\r\n  password:             DS.attr('string'),\r\n  passwordConfirmation: DS.attr('string'),\r\n  role:                 DS.attr('string'),\r\n  meta:                 DS.belongsTo('meta', { polymorphic: true, async: true })\r\n});\r\n\r\n// app/models/meta.js\r\nimport DS from 'ember-data';\r\n\r\nexport default DS.Model.extend({\r\n  user: DS.belongsTo('user', { async: true })\r\n});\r\n```\r\n\r\nWhen I try querying for a user (`this.store.find('user', 3)`), I get this stack trace:\r\n\r\n```javascript\r\n\"TypeError: Cannot read property 'typeKey' of undefined\r\n    at Ember.Object.extend.modelFor (http://localhost:4200/assets/vendor.js:83610:22)\r\n    at Ember.Object.extend.recordForId (http://localhost:4200/assets/vendor.js:83065:25)\r\n    at deserializeRecordId (http://localhost:4200/assets/vendor.js:84055:27)\r\n    at http://localhost:4200/assets/vendor.js:84032:11\r\n    at http://localhost:4200/assets/vendor.js:81775:20\r\n    at Map.forEach.cb (http://localhost:4200/assets/vendor.js:29124:13)\r\n    at OrderedSet.forEach (http://localhost:4200/assets/vendor.js:28918:13)\r\n    at Map.forEach (http://localhost:4200/assets/vendor.js:29128:19)\r\n    at Function.Model.reopenClass.eachRelationship (http://localhost:4200/assets/vendor.js:81774:42)\r\n    at normalizeRelationships (http://localhost:4200/assets/vendor.js:84028:12)\"\r\n```\r\n\r\nDoes anyone know why this is happening / how to resolve it? I cannot figure it out, I've tried stepping through but I am not familiar enough with ember-data!\r\n"},"comment":{"url":"https://api.github.com/repos/emberjs/data/issues/comments/108078105","html_url":"https://github.com/emberjs/data/issues/2752#issuecomment-108078105","issue_url":"https://api.github.com/repos/emberjs/data/issues/2752","id":108078105,"user":{"login":"wecc","id":708205,"avatar_url":"https://avatars.githubusercontent.com/u/708205?v=3","gravatar_id":"","url":"https://api.github.com/users/wecc","html_url":"https://github.com/wecc","followers_url":"https://api.github.com/users/wecc/followers","following_url":"https://api.github.com/users/wecc/following{/other_user}","gists_url":"https://api.github.com/users/wecc/gists{/gist_id}","starred_url":"https://api.github.com/users/wecc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wecc/subscriptions","organizations_url":"https://api.github.com/users/wecc/orgs","repos_url":"https://api.github.com/users/wecc/repos","events_url":"https://api.github.com/users/wecc/events{/privacy}","received_events_url":"https://api.github.com/users/wecc/received_events","type":"User","site_admin":false},"created_at":"2015-06-02T19:56:47Z","updated_at":"2015-06-02T19:56:47Z","body":"@joshpfosi does a payload like the one posted by @jorgedavila25 work? can this be closed?"}}