Details
-
Bug
-
Resolution: Cannot Reproduce
-
Critical - P2
-
None
-
2.11.1
-
None
-
Mac OS X
Description
In one collection I have an embedded array of ObjectIds. The name of the array is "user_ids". I wrote a query to fetch all elements from the collection where the array has at least 1 element. The native MongoDB query looks like this:
db.mycollection.find( {"user_ids.0" :
{ "$exists" : true }} )
and it works fine. It returns 2 elements. In Java I did it like this:
query.put("user_ids.0", new BasicDBObject("$exists", Boolean.TRUE) );
Unfortunately it returns only 1 element. 1 is missing.
It looks like a bug.