From b6e04029176bd15253ad1889b771df456f20af75 Mon Sep 17 00:00:00 2001 From: Benjamin Pannell Date: Mon, 5 May 2014 00:20:04 +0200 Subject: [PATCH] We don't need to explicitly handle _id changes in Instance --- lib/Instance.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/Instance.js b/lib/Instance.js index de1fd91..c37b069 100644 --- a/lib/Instance.js +++ b/lib/Instance.js @@ -145,8 +145,6 @@ Instance.prototype.save = function(conditions, changes, callback) { this.__state.model.toSource(original); this.__state.model.toSource(modified); - if(!_.isEqual(modified._id, original._id)) return onError(new Error('Cannot change _id, if you want to create a new document please use Model.create')); - changes = Instance.diff(original, modified); }