Reputation: 23873
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://emberjs.jsbin.com/vaniyo/2/edit?html,js,output
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?
Upvotes: 0
Views: 290
Reputation: 23873
I've resolved the issue for me and published the solution as an Ember CLI addon: https://github.com/lolmaus/ember-cli-stained-by-children
If it helps you, please star it.
Upvotes: 0