{"action":"closed","issue":{"url":"https://api.github.com/repos/js-data/js-data/issues/299","labels_url":"https://api.github.com/repos/js-data/js-data/issues/299/labels{/name}","comments_url":"https://api.github.com/repos/js-data/js-data/issues/299/comments","events_url":"https://api.github.com/repos/js-data/js-data/issues/299/events","html_url":"https://github.com/js-data/js-data/issues/299","id":127817746,"number":299,"title":"Injecting a new record object structure of an existing record throws an error","user":{"login":"crobinson42","id":5973579,"avatar_url":"https://avatars.githubusercontent.com/u/5973579?v=3","gravatar_id":"","url":"https://api.github.com/users/crobinson42","html_url":"https://github.com/crobinson42","followers_url":"https://api.github.com/users/crobinson42/followers","following_url":"https://api.github.com/users/crobinson42/following{/other_user}","gists_url":"https://api.github.com/users/crobinson42/gists{/gist_id}","starred_url":"https://api.github.com/users/crobinson42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crobinson42/subscriptions","organizations_url":"https://api.github.com/users/crobinson42/orgs","repos_url":"https://api.github.com/users/crobinson42/repos","events_url":"https://api.github.com/users/crobinson42/events{/privacy}","received_events_url":"https://api.github.com/users/crobinson42/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-21T00:29:56Z","updated_at":"2016-01-21T04:05:59Z","closed_at":"2016-01-21T04:05:59Z","body":"js-data 2.8.2\r\njs-data-http 2.1.2\r\n\r\nWhen injecting an object over an existing instance already in the resource (same id's), if an attribute on the new object being injected is different then the existing attribute type (`typeof`), an error is thrown that does not relate.\r\n\r\nConsole showing `console.log` of existing record attribute being a string then an `inject` comes along with an attribute in the record that is now an object and the error is thrown\r\n```\r\nbundle.js:17644 Existing Location attr:  5671e6538abd876429ffe0ff\r\nbundle.js:17645 Injecting Location attr:  5671e6538abd876429ffe0ff\r\nbundle.js:17644 Existing Location attr:  5671e6538abd876429ffe0ff\r\n\r\nbundle.js:17645 Injecting Location attr:  Object {active: true, city: \"Sacramento\", createdAt: \"2015-12-16T22:31:47.576Z\", fullAddress: \"undefined↵ undefined, undefined undefined\"…}\r\n\r\nUncaught (in promise) IllegalArgumentError {type: \"IllegalArgumentError\", message: \"\"id\" must be a string or a number!\"}\r\n\r\nbundle.js:17644 Existing Location attr:  Object {active: true, city: \"Sacramento\", createdAt: \"2015-12-16T22:31:47.576Z\", fullAddress: \"undefined↵ undefined, undefined undefined\"…}\r\nbundle.js:17645 Injecting Location attr:  Object {active: true, city: \"Sacramento\", createdAt: \"2015-12-16T22:31:47.576Z\", fullAddress: \"undefined↵ undefined, undefined undefined\"…}\r\n```\r\n\r\nIt seems that anytime an existing instance's attribute `typeof` is changed on an inject it throws this error: \r\n\r\n```\r\nUncaught (in promise) IllegalArgumentError {type: \"IllegalArgumentError\", message: \"\"id\" must be a string or a number!\"}\r\n```\r\n\r\nScreencast:\r\nhttp://recordit.co/lA6YrL7rBw\r\n"}}