[DOCS-8337] Comment on: "manual/reference/method/db.collection.findOneAndUpdate.txt" Created: 13/Jul/16  Updated: 26/Jul/16  Resolved: 22/Jul/16

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

Type: Bug Priority: Minor - P4
Reporter: Docs Collector User (Inactive) Assignee: Jonathan DeStefano
Resolution: Done Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Location: https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndUpdate/
User-Agent: Mozilla/5.0 (Windows NT 6.1; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; MS-RTC LM 8; .NET4.0E; InfoPath.3; rv:11.0) like Gecko
Screen Resolution: 1366 x 768


Participants:
Days since reply: 7 years, 30 weeks, 2 days ago

 Description   

In the example provided for 'Update document with Upsert', return document seems to be wrong -

Returned new document contains "_id" : 5239 whereas the _id field is not present either in query document or in update document. In this case it should contain an objectId assigned by mongod or the driver.



 Comments   
Comment by Githook User [ 18/Jul/16 ]

Author:

{u'username': u'jdestefano-mongo', u'name': u'jonathan', u'email': u'jonathan.destefano@10gen.com'}

Message: DOCS-8337 - Fixed 'Update Document with Upsert' example by adding upsert param to method call and ObjectId to result. Performed some page cleanup, changing mentions of 'replacement' to 'update'.

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

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