diff options
Diffstat (limited to 'src/mongo/scripting/mozjs/mongo.cpp')
-rw-r--r-- | src/mongo/scripting/mozjs/mongo.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/scripting/mozjs/mongo.cpp b/src/mongo/scripting/mozjs/mongo.cpp index 9a27f8a5e44..a850a7a9d1a 100644 --- a/src/mongo/scripting/mozjs/mongo.cpp +++ b/src/mongo/scripting/mozjs/mongo.cpp @@ -367,8 +367,10 @@ void MongoBase::Functions::find::call(JSContext* cx, JS::CallArgs args) { int batchSize = ValueWriter(cx, args.get(5)).toInt32(); int options = ValueWriter(cx, args.get(6)).toInt32(); + const Query query = Query::fromBSONDeprecated(q); std::unique_ptr<DBClientCursor> cursor(conn->query(NamespaceString(ns), - q, + query.getFilter(), + query, limit, nToSkip, haveFields ? &fields : nullptr, |