-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[BETA] new records are improperly reloaded when relationships are set #5655
Comments
models/github-commit.js: import DS from 'ember-data';
const { attr, belongsTo, hasMany } = DS;
export default DS.Model.extend({
deploys: hasMany('deploy'),
app: belongsTo('app'),
sha: attr('string'),
message: attr('string'),
url: attr('string')
}); Note that the reverse association is not defined in models/app.js |
@wagenet I've run into a similar error trying to upgrade from ember-data 3.4. Have you managed to find a workaround for this issue? |
@jeanduplessis our solution ended up being to refactor some of our code to avoid doing this. As it turns out, this was better architecturally for our app anyway. |
@jeanduplessis still an issue? if so I'd love a test PR. |
@runspired, unfortunately, I moved on from the project so not sure about the state of things anymore. |
Sorry, I have the inverse problem (the relationship is reloaded when setting to a new record) |
Opened #7844 for @kategengler, closing this issue. |
@kategengler I put together this test to show we may have fixed it in the meantime. Would you mind checking it out and letting me know if I am missing something? |
Version: ember-data@3.5.0-beta.2
Triggering code:
error.stack:
Chrome DevTools Stack:
The text was updated successfully, but these errors were encountered: