如图,我在test中插入了一条数据。
然后我用插入的数据作为查询条件,也能查到这条数据:
但是我将一个子项使用 $gte
就查不到了
大家有人知道为什么吗?
伊谢尔伦2017-04-17 15:31:22
It should be written like this db.test.find({"o_id.ep":{$gte:34}})
If you write it like that, you are judging that o_id is equal to {c:1,p:5,ep:{$gte:34}}. Obviously there is no such record