我有一个 Meteor 集合,我想在其中指定一个查询来查找属性为假的所有文档。换句话说,在它不存在的地方,null,false。在本机 Mongo 中,以下语法有效:
find({category: "Cereal", showOnList: {"$ne": true}})
在这种情况下,所有文档都没有该元素showOnList
,因此与我的查询匹配。在 Meteor(客户端)中,使用此语法时出现以下错误:
Uncaught SyntaxError: Unexpected token )
at Object.InjectedScript._evaluateOn (<anonymous>:904:140)
at Object.InjectedScript._evaluateAndWrap (<anonymous>:837:34)
at Object.InjectedScript.evaluate
(<anonymous>:693:21)InjectedScript._evaluateOn @ VM220:904InjectedScript._evaluateAndWrap @ VM220:837InjectedScript.evaluate @ VM220:693
还有其他人遇到这个问题并有解决方法吗?这是流星虫吗?