{"action":"created","issue":{"url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/561","repository_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage","labels_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/561/labels{/name}","comments_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/561/comments","events_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/561/events","html_url":"https://github.com/samselikoff/ember-cli-mirage/issues/561","id":132716170,"number":561,"title":"shorthand/base#_getAttrsForRequest  should normalize relationships too","user":{"login":"abuiles","id":21772,"avatar_url":"https://avatars.githubusercontent.com/u/21772?v=3","gravatar_id":"","url":"https://api.github.com/users/abuiles","html_url":"https://github.com/abuiles","followers_url":"https://api.github.com/users/abuiles/followers","following_url":"https://api.github.com/users/abuiles/following{/other_user}","gists_url":"https://api.github.com/users/abuiles/gists{/gist_id}","starred_url":"https://api.github.com/users/abuiles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abuiles/subscriptions","organizations_url":"https://api.github.com/users/abuiles/orgs","repos_url":"https://api.github.com/users/abuiles/repos","events_url":"https://api.github.com/users/abuiles/events{/privacy}","received_events_url":"https://api.github.com/users/abuiles/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-10T14:40:08Z","updated_at":"2016-02-11T08:42:39Z","closed_at":null,"body":"The method only normalized the attributes and leaves out the relationships.\r\n\r\nIf I have a payload like the following \r\n\r\n```\r\n{\r\n  \"data\": {\r\n    \"attributes\": {\r\n      \"does-mirage\": true,\r\n      \"name\": \"sam\"\r\n    },\r\n    \"relationships\": {\r\n      \"company\": {\r\n        \"data\": {\r\n          \"id\": \"1\",\r\n          \"type\": \"companies\"\r\n        }\r\n      },\r\n      \"github-account\": {\r\n        \"data\": {\r\n          \"id\": \"1\",\r\n          \"type\": \"github-accounts\"\r\n        }\r\n      }\r\n    },\r\n    \"type\": \"github-account\"\r\n  }\r\n}\r\n```\r\n\r\nThe output should be something like\r\n\r\n```\r\n{name: \"Sam\", doesMirage: true, companyId: 1, githubAccountId: 1}\r\n```\r\n\r\nI'm working on a PR, will submit shortly :) "},"comment":{"url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/comments/182767172","html_url":"https://github.com/samselikoff/ember-cli-mirage/issues/561#issuecomment-182767172","issue_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/561","id":182767172,"user":{"login":"samselikoff","id":2922250,"avatar_url":"https://avatars.githubusercontent.com/u/2922250?v=3","gravatar_id":"","url":"https://api.github.com/users/samselikoff","html_url":"https://github.com/samselikoff","followers_url":"https://api.github.com/users/samselikoff/followers","following_url":"https://api.github.com/users/samselikoff/following{/other_user}","gists_url":"https://api.github.com/users/samselikoff/gists{/gist_id}","starred_url":"https://api.github.com/users/samselikoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samselikoff/subscriptions","organizations_url":"https://api.github.com/users/samselikoff/orgs","repos_url":"https://api.github.com/users/samselikoff/repos","events_url":"https://api.github.com/users/samselikoff/events{/privacy}","received_events_url":"https://api.github.com/users/samselikoff/received_events","type":"User","site_admin":false},"created_at":"2016-02-11T08:42:39Z","updated_at":"2016-02-11T08:42:39Z","body":"Nice... good catch. Would the document ever contain has-many relationships? I.e. relationships that primary document model does not own the foreign keys to? Is there any way to check for this? Possibly by introspecting the model?"}}