ember-data-model-fragments
                                
                                 ember-data-model-fragments copied to clipboard
                                
                                    ember-data-model-fragments copied to clipboard
                            
                            
                            
                        [Model Fragments - 5.0.0-beta.0] Fragment Array returned in changedAttributes of record
Summary
record.changedAttributes() in the adapter is returning the fragment array of the model which was not returned in the older version say 4.0.0
Details
Let's assume a model models/filter.js as
import Model, { attr } from '@ember-data/model';
import { fragmentArray } from 'ember-data-model-fragments/attributes';
export default Model.extend({
  name: attr('string'),
  conditions: fragmentArray('condition')
})
and the models/condition.js as
import { attr } from '@ember-data/model';
import Fragment from 'ember-data-model-fragments/fragment';
export default Fragment.extend({
  field: attr('string'),
  predicate: attr('string'),
  value: attr()
});
When I try to create a filter record like this
   const filter = this.store.createRecord('filter');
   filter.set('name', 'Test');
   filter.set('conditions', []);
   filter.save();
In the adapter we get the changedAttributes by calling record.changedAttributes() and create the payload based on this method's response. And for the fragments we used to check the hasDirtyAttributes property in the fragment to check if this needs to be in the payload or not.
Up until the version 4.0.0 the record.changedAttributes() did not return the conditions property in the object. But after trying out the 5.0.0-beta.0 version, I see that the conditions attribute is returned in the record.changedAttributes() which is breaking our test cases. Is this the intentional behavior going forward?
As far as I know this was a bug that the fragment was not returned in the changedAttributes. I'm pretty sure it was in earlier versions 😉
Is there any tentative release date for the stable version?
there seems to be a fair amount of issues in the beta so it will probably be some time before a stable version