-
Type:
Bug
-
Resolution: Cannot Reproduce
-
Priority:
Major - P3
-
None
-
Affects Version/s: 2.2
-
Component/s: None
-
None
-
Environment:Windows, Linux
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Consider that we have a document with some fields. If I try to delete like below, it can happen sometimes that it is not deleted in some occasions without returning any exception and/or WriteResult error:
DBObject q = new BasicDBObjectBuilder().start().add("_id", new ObjectId(id)).get();
DBCursor res = mongoDBConnector.getContacts().find(q);
if (res.hasNext())
However, I can delete successfully by using the field _id of the document like below:
DBObject q = new BasicDBObjectBuilder().start().add("_id", new ObjectId(id)).get();
mongoDBConnector.getContacts().remove(q);