[DOCS-10338] findOneAndUpdate (and findAndModify) needs sample code for how to do non-updating upserts Created: 02/Jun/17 Updated: 30/Oct/23 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual |
| Affects Version/s: | None |
| Fix Version/s: | Server_Docs_20231030 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | William Byrne III | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: | |
| Days since reply: | 1 year, 14 weeks, 2 days ago |
| Epic Link: | DOCSP-1769 |
| Description |
|
If you want to use findOneAndUpdate (which is just a wrapper for findAndModify) to:
it is not clear in our documentation how to achieve that. This can be fixed by adding an example at the appropriate places in the docs that explains if both the <query> and <update> parameters to findOneAndUpdate are set to the same set of key:value equality conditions {f1:v1, f2:v2, ...}, then the existing document will not be updated. |
| Comments |
| Comment by Education Bot [ 31/Oct/22 ] |
|
Hello! This ticket has been closed due to inactivity. If you believe this ticket is still important, please reopen it and leave a comment to explain why. Thank you! |