Record "isDirty=true" via [relationship].willDestory
See original GitHub issueVersion
3.8.1
Test Case
Model:
import Model, { attr, belongsTo, hasMany } from '@ember-data/model';
export default class ProjectModel extends Model {
@attr('string') projectName;
@belongsTo('engagement') engagement;
@belongsTo('collectionperiod') collectionPeriod;
@attr('string') owner;
@attr proxyUsers;
@hasMany('team-criteria', {inverse: 'project'}) teams;
}
Template:
{{#with (changeset this.dataManagement.currentProject changesetKeys=this.projectChangesetKeys) as |projectChangeset|}}
...
{{/with}}
Expected Behavior
Model upon load is not dirty as no changes have happened.
Actual Behavior
projectChangeset.changes is reporting:
[
{
"key": "engagement.willDestroy"
},
{
"key": "teams.willDestroy"
},
{
"key": "_oldWillDestroy"
},
{
"key": "willDestroy"
}
]
Issue Analytics
- State:
- Created 3 years ago
- Comments:10
Top Results From Across the Web
ember-data.js - gists · GitHub
We call the record to which a relationship belongs the. relationship's _owner_ ... Add records to a transaction using the `add()` method: ......
Read more >'[webkit-changes] [216735] trunk/PerformanceTests' - MARC
NET trace +// the stack via arguments.caller.callee and Firefox dies if +// you try ... + // if all of type `connection` must...
Read more >Download Diff File - Gitea
Similar to regular injection rules, but are run against factories, via - `Registry#lookupFactory`. - These rules are used to inject objects onto factories ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

No, I think we can close this. I discovered that the error had something to do with modifying the wrong record and thinking I had the correct one. I had to pass in a reference to the model I was modifying in the
@onChangehandler of the power-select instance so that I could be explicit as to what I was updating. Thank you for your help.Ya that was wwhat #525 was looking to verify and it seems all tests are passing. If you had a test case that was failing, I’m sure we could come up with a solution!