[SERVER-3440] Add $setOnInsert command Created: 18/Jul/11 Updated: 18/Jul/11 Resolved: 18/Jul/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Minor - P4 |
| Reporter: | Ryan Nitz | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
The upsert feature in Mongo is incredibly useful, but it often results in a lot of redundant $set operations when used in conjunction with counters/increment. This would be incredibly handy: toSetOnInsert = { } toInc = { } vals= { } db.foo.update({_id: "foo"}, vals, true, false); |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 18/Jul/11 ] |
|
See |