Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
-
MongoDB 3.2
Windows 7 64bits
*Location*: https://docs.mongodb.org/manual/reference/method/db.collection.deleteOne/#db.collection.deleteOne
*User-Agent*: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.80 Safari/537.36
*Referrer*: https://docs.mongodb.org/manual/reference/method/
*Screen Resolution*: 1024 x 768
*repo*: docs
*source*: reference/method/db.collection.deleteOne
MongoDB 3.2 Windows 7 64bits *Location*: https://docs.mongodb.org/manual/reference/method/db.collection.deleteOne/#db.collection.deleteOne *User-Agent*: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.80 Safari/537.36 *Referrer*: https://docs.mongodb.org/manual/reference/method/ *Screen Resolution*: 1024 x 768 *repo*: docs *source*: reference/method/db.collection.deleteOne
Description
I believe that there is a mistake in one of the examples of the function deleteOne
The following operation deletes the order with _id: ObjectId("563237a41a4d68582c2509da") :
try {
db.employees.deleteOne(
);
}
catch (e)
inside the try block, when the deleteOne function is called , the collection should be order.
I also attach an screenshot (hosted in dropbox) of the example.
https://db.tt/VlMPRojw
Hope that i can help.