-
Type:
Bug
-
Resolution: Done
-
Priority:
Major - P3
-
None
-
Affects Version/s: 2.4
-
Component/s: API
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
I'm not 100% sure this is a Java bug, it may be a server or doc bug.
The following code fails to insert an object. If you change the last param (in the update method - multi = true) to false then this works as expected.
If this is the expected behavior, let me know and I will update the Javadoc comment for the method.
final ObjectId OBJ_ID = new ObjectId("4d09359b1cc223ebd7f9797f");
final BasicDBObject version = new BasicDBObject(ID, OBJ_ID);
version.put("prodVersion", pProdVersion);
version.put("devVersion", pDevVersion);
version.put("modified", now());
collection.update(new BasicDBObject(ID, OBJ_ID), version, true, true);