也就是类似sql中的where 字段A=字段B这样的条件,我查了下网上有些帖子中写的用$where的方式我查询的时候会出错,类似于:new Document("$where",new Document("字段A", "字段B")),请教应该怎么写才对?
迷茫2017-04-28 09:08:01
Mongo does not support queries that compare two fields with each other. You can only read and compare the two fields through the program. This effect cannot be achieved in the query conditions.