Skip to content

Commit

Permalink
We don't need to explicitly handle _id changes in Instance
Browse files Browse the repository at this point in the history
  • Loading branch information
notheotherben committed May 4, 2014
1 parent 80e0fe5 commit b6e0402
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/Instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit b6e0402

Please sign in to comment.