Files
mongo/jstests/aggregation/bugs/server6335.js
2012-07-12 18:45:46 -04:00

7 lines
235 B
JavaScript

// server-6335: don't allow $where clauses in a $match
out = db.foo.aggregate({$match: {$where: "return true"}})
assert.eq(out.code, 16395)
out = db.foo.aggregate({$match: {$and:[{$where: "return true"}]}})
assert.eq(out.code, 16395)