{"action":"created","issue":{"url":"https://api.github.com/repos/emberjs/data/issues/3760","labels_url":"https://api.github.com/repos/emberjs/data/issues/3760/labels{/name}","comments_url":"https://api.github.com/repos/emberjs/data/issues/3760/comments","events_url":"https://api.github.com/repos/emberjs/data/issues/3760/events","html_url":"https://github.com/emberjs/data/issues/3760","id":105990074,"number":3760,"title":"JSONSerializer.serializeHasMany() behaves differently depending on the way the record has been added to the store","user":{"login":"sebweaver","id":1648321,"avatar_url":"https://avatars.githubusercontent.com/u/1648321?v=3","gravatar_id":"","url":"https://api.github.com/users/sebweaver","html_url":"https://github.com/sebweaver","followers_url":"https://api.github.com/users/sebweaver/followers","following_url":"https://api.github.com/users/sebweaver/following{/other_user}","gists_url":"https://api.github.com/users/sebweaver/gists{/gist_id}","starred_url":"https://api.github.com/users/sebweaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebweaver/subscriptions","organizations_url":"https://api.github.com/users/sebweaver/orgs","repos_url":"https://api.github.com/users/sebweaver/repos","events_url":"https://api.github.com/users/sebweaver/events{/privacy}","received_events_url":"https://api.github.com/users/sebweaver/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-11T11:10:58Z","updated_at":"2015-09-13T16:00:11Z","closed_at":null,"body":"Here is a JSBin highlighting the two behaviors: http://emberjs.jsbin.com/rocano/8/edit?js,console,output\r\n\r\nOn the first case (post added by `createRecord`) the json is:\r\n```javascript\r\n{ comments: [] }\r\n```\r\nOn the 2nd case (post added by `push`) the json is:\r\n```javascript\r\n{ comments: undefined }\r\n```\r\nShouldn't be the same (i.e. the 1st one)? Or is it by design to have undefined relationships on the 2nd one?"},"comment":{"url":"https://api.github.com/repos/emberjs/data/issues/comments/139890994","html_url":"https://github.com/emberjs/data/issues/3760#issuecomment-139890994","issue_url":"https://api.github.com/repos/emberjs/data/issues/3760","id":139890994,"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-09-13T16:00:11Z","updated_at":"2015-09-13T16:00:11Z","body":"I would still consider this a bug. Unknown relationship should be omitted when serializing records using `JSONSerializer` (and `RESTSerializer`)."}}