Details
-
Bug
-
Resolution: Cannot Reproduce
-
Major - P3
-
None
-
2.2
-
None
-
None
-
Windows, Linux
Description
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);