This line is specifically checking the _attributes of the "internalModel" of the record, which apparently is not (immediately?) affected when we empty the _attributes of the child object.
I implemented the following hack to get things working again for me, changing line 40 of clean-embedded-children from:
child.set('_attributes', {});
to
child.set('_internalModel._attributes', {});
This works for my use case, but I'm not familiar enough with ember-data internals to know what the "right" way to do this actually would be.
(P.S. Thank you for writing this add-on. It has been extremely helpful!)
When using the clean-embedded-children mixing with Ember-data beta 19.2, the children are no longer being marked as cleaned after they are saved. I'm not familiar with how this worked in the past, but at this version in ember-data, there is the following line checking the _attributes to determine whether the object isDirty: https://github.com/emberjs/data/blob/23a5b13a9bccd3f26515f4992dd59960d6649df0/packages/ember-data/lib/system/model/states.js#L548
This line is specifically checking the _attributes of the "internalModel" of the record, which apparently is not (immediately?) affected when we empty the _attributes of the child object.
I implemented the following hack to get things working again for me, changing line 40 of clean-embedded-children from:
to
This works for my use case, but I'm not familiar enough with ember-data internals to know what the "right" way to do this actually would be.
(P.S. Thank you for writing this add-on. It has been extremely helpful!)