I am working with Ember and Ember Data, and the JSON I get back from the server contains an embedded object array. I need to know what I am doing wrong. I have a JSBin with the code below:
http://emberjs.jsbin.com/faledu/6/edit?html,js,output
Currently, I am getting the following error:
Error while processing route: index Assertion Failed: Ember Data expected a number or string to represent the record(s) in the
objects
relationship instead it found an object. If this is a polymorphic relationship please specify atype
key. If this is an embedded relationship please include theDS.EmbeddedRecordsMixin
and specify theobjects
property in your serializer's attrs object. Error: Assertion Failed: Ember Data expected a number or string to represent the record(s) in theobjects
relationship instead it found an object. If this is a polymorphic relationship please specify atype
key. If this is an embedded relationship please include theDS.EmbeddedRecordsMixin
and specify theobjects
property in your serializer's attrs object.
I am using DS.EmbeddedRecordsMixin in my serializer, but it doesn't seem to be working. How can I use that JSON with Ember Data?