Ensure changes are created in sync
This commit is contained in:
parent
52eb72d94f
commit
77bd77e625
|
@ -882,13 +882,13 @@ DataModel.enableChangeTracking = function() {
|
|||
Change.attachTo(this.dataSource);
|
||||
Change.getCheckpointModel().attachTo(this.dataSource);
|
||||
|
||||
Model.on('changed', function(obj) {
|
||||
Model.rectifyChange(obj.getId(), Model.handleChangeError);
|
||||
});
|
||||
Model.afterSave = function afterSave(next) {
|
||||
Model.rectifyChange(this.getId(), next);
|
||||
}
|
||||
|
||||
Model.on('deleted', function(id) {
|
||||
Model.rectifyChange(id, Model.handleChangeError);
|
||||
});
|
||||
Model.afterDestroy = function afterDestroy(next) {
|
||||
Model.rectifyChange(this.getId(), next);
|
||||
}
|
||||
|
||||
Model.on('deletedAll', cleanup);
|
||||
|
||||
|
|
Loading…
Reference in New Issue