belongsTo tracking not working Ember Data 3.3.2
When i change belongsoTo modelChanges == {} /test-model
export default DS.Model.extend({
changeTracker: { only: ['belongs', 'name', 'manyMany'] },
name: DS.attr('string),
belong: DS.belongsTo('belong'),
manyMany: DS.hasMany('many-many')
});
testModel.startTrack(); if i set hasMany testModel.set('manyMany', [this correct data]) modelChanges {manyMany: true} it ok
testModel.set('belong', this correct data ) modelChanges {}
@loxmys , since everyone has different setup and models, and I can't recreate you exact scenario on my own ( I might miss something ) if you can make a failing test in a PR then I can try and fix the issue.
@danielspaniel I quickly debug app. https://github.com/danielspaniel/ember-data-change-tracker/blob/master/addon/utilities.js#L14 returns old value. canonicalState has previus value. I watched ember-data addon, it does not have inverseRecordData property, but have inverseInternalModel propery. inverseInternalModel have correct (updated value) Maybe i must use another version? Thanks!
oh ok, you might want to try the previous versions like v0.7.X because they were for ember data less than 3.5 you can see the notes on the tags also to see what i mean
@danielspaniel i fix this issue. ember-data-change-tracker 0.8.0 wokrs with ember-data 3.5.2
ember-data-change-tracker 0.7.x, 0.8.0 not works with ember-data 3.3.2 (only belongTo tracker. Have different properties when search current value)
Maybe neeed add works versions to docs? Its very userful addon for ember date! Thank you!
oh yeah.. i should set that in the readme, to explain what versions work for what ember-data. if you feel like helping out please make a PR and add that to docs. Would be nice addition.