{"action":"created","issue":{"url":"https://api.github.com/repos/digitalsadhu/loopback-component-jsonapi/issues/100","labels_url":"https://api.github.com/repos/digitalsadhu/loopback-component-jsonapi/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/digitalsadhu/loopback-component-jsonapi/issues/100/comments","events_url":"https://api.github.com/repos/digitalsadhu/loopback-component-jsonapi/issues/100/events","html_url":"https://github.com/digitalsadhu/loopback-component-jsonapi/pull/100","id":126890265,"number":100,"title":"Added failing test to show not being able to create a through model directly","user":{"login":"taras","id":74687,"avatar_url":"https://avatars.githubusercontent.com/u/74687?v=3","gravatar_id":"","url":"https://api.github.com/users/taras","html_url":"https://github.com/taras","followers_url":"https://api.github.com/users/taras/followers","following_url":"https://api.github.com/users/taras/following{/other_user}","gists_url":"https://api.github.com/users/taras/gists{/gist_id}","starred_url":"https://api.github.com/users/taras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taras/subscriptions","organizations_url":"https://api.github.com/users/taras/orgs","repos_url":"https://api.github.com/users/taras/repos","events_url":"https://api.github.com/users/taras/events{/privacy}","received_events_url":"https://api.github.com/users/taras/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-01-15T15:05:28Z","updated_at":"2016-01-16T13:44:44Z","closed_at":"2016-01-16T13:04:18Z","pull_request":{"url":"https://api.github.com/repos/digitalsadhu/loopback-component-jsonapi/pulls/100","html_url":"https://github.com/digitalsadhu/loopback-component-jsonapi/pull/100","diff_url":"https://github.com/digitalsadhu/loopback-component-jsonapi/pull/100.diff","patch_url":"https://github.com/digitalsadhu/loopback-component-jsonapi/pull/100.patch"},"body":"I'm trying to create a through model via POST to `/interests` but I'm getting an error without stacktrace. \r\n\r\n```\r\n[{ status: 500,\r\n    source: '',\r\n    title: 'TypeError',\r\n    code: '',\r\n    detail: 'Cannot read property \\'id\\' of null' \r\n} ]\r\n```"},"comment":{"url":"https://api.github.com/repos/digitalsadhu/loopback-component-jsonapi/issues/comments/172208042","html_url":"https://github.com/digitalsadhu/loopback-component-jsonapi/pull/100#issuecomment-172208042","issue_url":"https://api.github.com/repos/digitalsadhu/loopback-component-jsonapi/issues/100","id":172208042,"user":{"login":"digitalsadhu","id":1177098,"avatar_url":"https://avatars.githubusercontent.com/u/1177098?v=3","gravatar_id":"","url":"https://api.github.com/users/digitalsadhu","html_url":"https://github.com/digitalsadhu","followers_url":"https://api.github.com/users/digitalsadhu/followers","following_url":"https://api.github.com/users/digitalsadhu/following{/other_user}","gists_url":"https://api.github.com/users/digitalsadhu/gists{/gist_id}","starred_url":"https://api.github.com/users/digitalsadhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/digitalsadhu/subscriptions","organizations_url":"https://api.github.com/users/digitalsadhu/orgs","repos_url":"https://api.github.com/users/digitalsadhu/repos","events_url":"https://api.github.com/users/digitalsadhu/events{/privacy}","received_events_url":"https://api.github.com/users/digitalsadhu/received_events","type":"User","site_admin":false},"created_at":"2016-01-16T13:44:44Z","updated_at":"2016-01-16T13:44:44Z","body":"Nice.\n\nOn Sat, 16 Jan 2016 at 14:42, Taras Mankovski <notifications@github.com>\nwrote:\n\n> I think a more appropriate check is\n>\n> if (_.isEmpty(resource.id)){\n>   return null;\n> }\n>\n> There is a problem with include test\n> https://github.com/digitalsadhu/loopback-component-jsonapi/blob/master/test/include.test.js#L18.\n> It's allowing data to be serialized for objects without an id. Looking into\n> why this is happening.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/digitalsadhu/loopback-component-jsonapi/pull/100#issuecomment-172207938>\n> .\n>\n"}}