[DOCS-10429] Comment on: "manual/reference/method/db.collection.deleteOne" Created: 24/Jun/17  Updated: 27/Oct/23  Resolved: 11/Jul/17

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: Unassigned
Resolution: Works as Designed Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Using Terminal in Ubuntu.

Location: https://docs.mongodb.com/manual/reference/method/db.collection.deleteOne/#db.collection.deleteOne
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0
Referrer: https://docs.mongodb.com/manual/crud/
Screen Resolution: 1680 x 1050


Participants:
Days since reply: 6 years, 31 weeks, 1 day ago

 Description   

This code don't work:
db.orders.deleteOne(

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

);

I change the "orders" to my definition (articles) and I change the id-num to match an id-num in my colletion (I ctrl+c - ctrl-v so I don't mess up).



 Comments   
Comment by Kay Kim (Inactive) [ 11/Jul/17 ]

The page refers to the example collection that has the specified example doc. If you use a different collection, then, yes, you must update the example to reflect the actual collection you run against.

Generated at Thu Feb 08 08:00:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.