[SERVER-2595] Allow specification of new document in findAndModify in upsert operation Created: 20/Feb/11 Updated: 17/Mar/11 Resolved: 20/Feb/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Keith Branton | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
all |
||
| Participants: |
| Description |
|
It would be really helpful to be able to pass another optional parameter, (insert perhaps), of type document, to findAndModify that is used as the starting point if the query doesn't match an existing document and and upsert is enabled. i.e. the modifiers would be applied to it and then it would be inserted. I assume there is some smart logic applying the query to the inserted object just now - and maybe that should still be applied to the new document so it's unnecessary to restate the _id in the insert document. |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 20/Feb/11 ] |
|
I believe |