Ember data, at what point are models created from response


I’m trying to dig through the internals of ember data as I want to be able to handle an associated model created in response to a create request of a parent.

E.g. with the following response:

{parent: {id: 1, children_ids: [1,2,3,4]}, children: [{id: 1, name: 'foo'}, ...]}

I want to know where in ember data the children models in the response are created (because I have client side models that exist already but don’t have an id, and want to re-use those).


You can push it with pushPayload, it expect id. I have same situation like that, so i just create “fake” id for the model then push it to store using pushPayload model.