[DOCS-2704] findAndModify upsert Beahavior Clarification Created: 10/Feb/14 Updated: 11/Apr/14 Resolved: 11/Apr/14 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual |
| Affects Version/s: | None |
| Fix Version/s: | v1.3.3 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Ralph Rodkey | Assignee: | Kay Kim (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | collector-298ba4e7 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Location: http://docs.mongodb.org/manual/reference/command/findAndModify/ |
||
| Participants: | |
| Days since reply: | 9 years, 44 weeks, 5 days ago |
| Description |
|
The docs for the "upsert" parameter are incomplete. They state what will happen if the "query" parameter matches no documents, but they don't say what would happen if the "query" parameter does match some documents. I wrote some code that assumed it worked as documented. I thought it was stupid that an upsert operation only did inserts and not updates, but I figured someone had just chosen a bad parameter name. I was wrong. It works as intended, but not as documented. |
| Comments |
| Comment by Githook User [ 11/Apr/14 ] |
|
Author: {u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}Message: |