Sideload Embedded records


#1

Anyone as noticed this weird behavior? Basically whenever I try to loading a records, which as any embedded record


#2

What’s the weird behavior? And please post examples of your code causing the issue.


#3

I’m sorry. Posted by mistake. I was trying to load embedded record in a sideloaded object (which is not embedded), but while writing that post, I found out that there is a know error with EmbeddedRecordMixin and sideloaded object.

I solved this just changing the server response, as I have access to the API server.


#4

You can always change the structure of the payload on the client before ember-data starts to “consume” the object. This is done on the normalizePayload payload hook of the DS.RestSerializer. It will most likely become your best friend in the future, so get to know it … will save you hours of headaches.

http://emberjs.com/api/data/classes/DS.RESTSerializer.html#method_normalizePayload