0
我有一个数组,它是Mongodb的一个过滤器。 但它不起作用,我不明白为什么。MongoDB过滤
Array
(
[deleted] => Array
(
[$ne] => 1
)
[public] => 1
[_id] => Array
(
[$nin] => Array
(
[0] => MongoId Object
(
[$id] => 525becec38aa9e28201f1d68
)
[1] => MongoId Object
(
[$id] => 525becb438aa9e963a1f1d55
)
[2] => MongoId Object
(
[$id] => 525bec7438aa9e8d3a1f1d56
)
[3] => MongoId Object
(
[$id] => 525bec1438aa9e6c6d1f1d69
)
[4] => MongoId Object
(
[$id] => 525bebcf38aa9e8c3a1f1d57
)
[5] => MongoId Object
(
[$id] => 525beb3038aa9e8d3a1f1d55
)
)
)
)
我需要找到标识符不在列表中的所有对象。
这是什么编程语言?我认为这可能是PHP,但我不确定。请添加适当的标签。 – Philipp
我不明白你想要做什么。请更具体一些,并告诉我们你已经尝试过了。 MongoDB查询必须完成什么? – Thibault
我试图让所有的对象不包含在列表中,数组中的列表$ nin if(!empty($ profile ['answers']))$ filter ['_ id'] ['$ nin '] [] = $ profile ['回答'];; if(!empty($ profile ['wrongAnswered']))$ filter ['__in''] ['$ nin'] = $ profile ['wrongAnswered']; ($ filter) - > limit(1) - > sort(array('gallery.0'=> -1)); – user3111364