[SERVER-4379] Atomic findOrCreate Created: 28/Nov/11  Updated: 29/Nov/11  Resolved: 29/Nov/11

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: David Taylor Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: atomic, findAndModify, findOrCreate
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

Similar to findAndModify with upsert, but does not modify the existing record if found.
Alternately, if findAndModify/upsert could take a separate dictionary of values used when creating new records versus for updating existing records, that could work too.

Useful for atomically creating a record only if no records match some conditions without changing existing records.



 Comments   
Comment by Eliot Horowitz (Inactive) [ 29/Nov/11 ]

SERVER-340 is the current plan

Comment by Scott Hernandez (Inactive) [ 28/Nov/11 ]

When there is support for $iset, or $initial in SERVER-340 it should be doable.

Generated at Thu Feb 08 03:05:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.