[SERVER-9637] Upsert with filters for a subdocument and a nested subdocument key result with an invalid BSON. (one document with two duplicate keys!) Created: 09/May/13 Updated: 06/Mar/14 Resolved: 09/May/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Write Ops |
| Affects Version/s: | 2.2.2, 2.4.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Alon Horev | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
OS X |
||
| Issue Links: |
|
||||||||||||
| Operating System: | ALL | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
Have a look at the resulting document, the 'key' subdocument repeats twice!: test> db.test.update({'key': {'nested': 1}, 'key.nested': 2}, {$set: {a:3}}, {upsert:true}) , } |
| Comments |
| Comment by Scott Hernandez (Inactive) [ 09/May/13 ] |
|
There are two issues here:
The second issue is not really a bug since currently we allow repeated fields in BSON/Documents. It may be unexpected behavior to some and is something we want to make less surprising without breaking existing applications. see SERVER-6439 |