[SERVER-4713] Upsert with $-positional operator can create bad documents Created: 18/Jan/12 Updated: 11/Jul/16 Resolved: 27/Dec/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Write Ops |
| Affects Version/s: | None |
| Fix Version/s: | 2.3.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Richard Kreuter (Inactive) | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
From a recent question in training: "what happens if you try to use the positional operator with upsert?". It appears it can create an invalid document with a dollarsign in the field name: db.foo.update( { 'x.a' : 6 }, { $set : { 'x.$.b' : -5 } }, true ) , |
| Comments |
| Comment by auto [ 27/Dec/12 ] |
|
Author: {u'date': u'2012-12-22T21:34:06Z', u'email': u'aaron@10gen.com', u'name': u'aaron'}Message: |