I have a custom conversion details: DS.attr('recursive_object') (this is a recursive object).
details attr can be edited in-place without changing the actual object reference (for example, detailed information about attr elements has been edited). This, however, does not call the flag of the parent record isDirty .
How can I manually notify an updated DS.Model entry?
Model Definition:
App.MyRecord = DS.Model.extend details: DS.attr "recursive object"
Editing details
What I tried:
Wrap record.makeChangeToDetails() with calls to will/didSetProperty :
record.send 'willSetProperty', name: 'details' record.makeChangeToDetails() record.send 'didSetProperty', name: 'details'
Call notifyPropertyChange
record.notifyPropertyChange 'details'
Call set and pass the same object to it.
record.makeChangeToDetails() record.set 'details', record.get('details')
I also tried sending other DS.model state events from here: https://github.com/emberjs/data/blob/master/packages/ember-data/lib/system/model/states.js including didChangeData , becameDirty , but neither one of them did not work.
Any ideas?
source share