-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Query Operations
-
None
The 3.0.x branch implementation of DBCursor.getQuery and DBCursor.getKeysWanted return a copy of the internal property, whereas before they returned a reference to the internal copy. This break clients who do:
DBCursor cursor = collection.find(new BasicDBObject()); cursor.getQuery().put("x", 1);
since because getQuery returns a copy, the put has no effect on the query that's actually performed.
This should be reverted to the previous behavior.