Closed VincentMolinie closed 9 months ago
The PR is not ready yet, I'll check why the CI is not passing
Okey it should be good now
Looks like the change is for 4.5+, but you mentioned 4.6, was that a typo?
Looks like the change is for 4.5+, but you mentioned 4.6, was that a typo?
Yes correct sorry. Because I thought at first it was just 4.6 but you are right it happens also for 4.5
Does this solve #427
Does this solve #427
I don't think so as it's related to Ember 3.28. But I actually had the issue on 3.28 but before ember-data-model-fragments@6.0.5
. So this issue might already be fixed anyway
Version released
I realised we had an issue on, that I reproduce pretty easily in my app with Ember-data 4.6. The RecordState is registered when we create a new Model. For a classic native model, the RecordState will be build after all the initial value of the attributes have been set. But with fragments it's the opposite, the RecordState is build first then the attributes are set which result in a duplicate update of the state
This produce the exact same error that you can find on this issue: https://github.com/adopted-ember-addons/ember-data-model-fragments/issues/427
My fix is based on the RecordDataDefault, I saw they are using
notifyPropertyChange
to notify an attribute has change instead of what we are doing which is using notifyStateChange to say the state of the record has changed