lundi 9 février 2015

How to update child records in the store when parent record is saved?

I'm using DS.EmbeddedRecordsMixin.


When i initially fetch a parent record containing child records from the server, child records automatically populate the store. I don't need to create child records manually.


But when i subsequently save a parent record, dirty child records remain dirty, and it seems that i have to update them manually.


Here's a demo: http://ift.tt/1zAVpqD


After editing a child's name and saving the parent, i expect the dirty child to update and become non-dirty.


Question 1: shouldn't DS.EmbeddedRecordsMixin take care of that?


Question 2: how do i have my child records updated to a non-dirty state when i save a parent record?


Aucun commentaire:

Enregistrer un commentaire