Permalink
Browse files

For consistency with other methods allow user to pass {where:query} w…

…hich is reduced internally to query
  • Loading branch information...
1 parent 98d2ad2 commit 4fd4967c4e186e30cdc62f9f2c45f0df1f95162e @jimib committed Mar 18, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/adapters/mongodb.js
@@ -116,6 +116,10 @@ MongoDB.prototype.create = function (model, data, callback) {
};
MongoDB.prototype.updateAll = function (model, query, update, callback) {
+ if(query && query.where){
+ query = query.where;
+ }
+
this.collection(model).update(query, update, {multi:true, upsert:false, safe:true}, function (err, m) {
callback(err);
});

0 comments on commit 4fd4967

Please sign in to comment.