From 81e4bcd35838fc606fb0829a90c803b0eb1cd7f9 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 18 Nov 2014 15:50:32 -0500 Subject: [PATCH] fix rename to multi --- src/database/mongo/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/database/mongo/main.js b/src/database/mongo/main.js index 0e6e471476..f02854b362 100644 --- a/src/database/mongo/main.js +++ b/src/database/mongo/main.js @@ -120,7 +120,7 @@ module.exports = function(db, module) { module.rename = function(oldKey, newKey, callback) { callback = callback || helpers.noop; - db.collection('objects').update({_key: oldKey}, {$set:{_key: newKey}}, callback); + db.collection('objects').update({_key: oldKey}, {$set:{_key: newKey}}, {multi: true}, callback); }; module.expire = function(key, seconds, callback) {