diff --git a/lib/persisted-model.js b/lib/persisted-model.js index 367e27a9..65ec8524 100644 --- a/lib/persisted-model.js +++ b/lib/persisted-model.js @@ -1440,7 +1440,7 @@ module.exports = function(registry) { switch (update.type) { case Change.UPDATE: tasks.push(function(cb) { - applyUpdate(Model, id, current, update.data, update.change, conflicts, options, cb); + applyUpdate(Model, id, {_id:current.id || current._id}, update.data, update.change, conflicts, options, cb); }); break; @@ -1451,7 +1451,7 @@ module.exports = function(registry) { break; case Change.DELETE: tasks.push(function(cb) { - applyDelete(Model, id, current, update.change, conflicts, options, cb); + applyDelete(Model, id, {_id:current.id || current._id}, update.change, conflicts, options, cb); }); break; }