I have a deeply nested model with one-to-one and one-to-many relationships. Initially I retrieved this model from server using standard ember-data API.
What I need to do now is to update model (and all its relationships) from a plain JSON retrieved by an AJAX call.
I cannot use reload()
method, because that would make an additional HTTP request - I already have the JSON payload, so no need for an extra HTTP request.
Is there a way to reload a model from JSON?
Aucun commentaire:
Enregistrer un commentaire