也就是类似sql中的where 字段A=字段B这样的条件,我查了下网上有些帖子中写的用$where的方式我查询的时候会出错,类似于:new Document("$where",new Document("字段A", "字段B")),请教应该怎么写才对?
人生最曼妙的风景,竟是内心的淡定与从容!
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.
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.