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:
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
objectsrelationship instead it found an object. If this is a polymorphic relationship please specify atypekey. If this is an embedded relationship please include theDS.EmbeddedRecordsMixinand specify theobjectsproperty in your serializer's attrs object. Error: Assertion Failed: Ember Data expected a number or string to represent the record(s) in theobjectsrelationship instead it found an object. If this is a polymorphic relationship please specify atypekey. If this is an embedded relationship please include theDS.EmbeddedRecordsMixinand specify theobjectsproperty 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?
Aucun commentaire:
Enregistrer un commentaire