[DOCS-6821] Comment on: "manual/reference/method/db.collection.deleteOne.txt" Created: 15/Dec/15  Updated: 08/Dec/16  Resolved: 15/Dec/15

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Ravind Kumar (Inactive)
Resolution: Done Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

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


Participants:
Days since reply: 8 years, 9 weeks, 1 day ago

 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(

{ "_id" : ObjectId("563237a41a4d68582c2509da") }

);
}
catch (e)

{ print(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.



 Comments   
Comment by Githook User [ 15/Dec/15 ]

Author:

{u'username': u'rkumar-mongo', u'name': u'ravind', u'email': u'ravind.kumar@10gen.com'}

Message: DOCS-6821 : Fixing examples for deleteOne

Additional minor fixes to deleteOne and deleteMany examples

Signed-off-by: kay <kay.kim@10gen.com>
Branch: master
https://github.com/mongodb/docs/commit/8ebe270b9843b7c79a368199d41403dbbbb24643

Comment by Ravind Kumar (Inactive) [ 15/Dec/15 ]

https://github.com/mongodb/docs/pull/2482

Comment by Kay Kim (Inactive) [ 15/Dec/15 ]

As the reporter stated, the collection name should be orders in the deleteOne examples.

Generated at Thu Feb 08 07:53:03 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.