[DOCS-1759] Clarify behavior of upsert operations when the query field has a unique index Created: 30/Jul/13  Updated: 17/Oct/14  Resolved: 17/Oct/14

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: v1.3.12

Type: Improvement Priority: Major - P3
Reporter: Daniel Pasette (Inactive) Assignee: Sam Kleinman (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-10350 Atomicity of Upserts on multi field u... Closed
Participants:
Days since reply: 9 years, 17 weeks, 5 days ago

 Description   

See: SERVER-10350 for discussion.

The behavior of updates and findAndModify with the upsert flag when the query predicate is on a unique index is the same. The findAndModify documentation explain this, but the update docs do not.

See the end of this page: http://docs.mongodb.org/manual/reference/command/findAndModify/

User suggests adding to this page as well:
http://docs.mongodb.org/manual/core/create/#crud-create-update



 Comments   
Comment by Githook User [ 17/Oct/14 ]

Author:

{u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-1759: adding cross reference
Branch: master
https://github.com/mongodb/docs/commit/979142bc53e75b58e550eb7cda31836b2a0e1057

Comment by Scott Hernandez (Inactive) [ 20/Jun/14 ]

This is covered in the update docs: http://docs.mongodb.org/manual/reference/method/db.collection.update/#use-unique-indexes

Not sure about describing this in the index docs, so it seems this can be closed as fixed already.

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