From 6a1fa82b8bff3f2532153410f451528b6dfae216 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 18 Apr 2014 13:14:34 -0400 Subject: [PATCH] closes #1402 --- src/database/mongo/hash.js | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/database/mongo/hash.js b/src/database/mongo/hash.js index 72cd9d6170..f157342885 100644 --- a/src/database/mongo/hash.js +++ b/src/database/mongo/hash.js @@ -61,11 +61,7 @@ module.exports = function(db, module) { _fields[fields[i]] = 1; } - keys = keys.map(function(key) { - return { _key : key}; - }); - - db.collection('objects').find({$or: keys}, _fields).toArray(function(err, items) { + db.collection('objects').find({_key: {$in: keys}}, _fields).toArray(function(err, items) { if (err) { return callback(err); } @@ -79,20 +75,14 @@ module.exports = function(db, module) { item; for (var i=0; i