Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

belongsTo tracking not working Ember Data 3.3.2 #58

Open
loxmys opened this issue Feb 25, 2019 · 5 comments
Open

belongsTo tracking not working Ember Data 3.3.2 #58

loxmys opened this issue Feb 25, 2019 · 5 comments

Comments

@loxmys
Copy link

loxmys commented Feb 25, 2019

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 loxmys changed the title belongsTo tracking not working under Ember Data 3.3.2 belongsTo tracking not working Ember Data 3.3.2 Feb 25, 2019
@danielspaniel
Copy link
Owner

@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.

@loxmys
Copy link
Author

loxmys commented Feb 25, 2019

@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!

@danielspaniel
Copy link
Owner

danielspaniel commented Feb 25, 2019 via email

@loxmys
Copy link
Author

loxmys commented Feb 26, 2019

@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!

@danielspaniel
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants