[SERVER-7070] Insertion of document with duplicate fields permitted in C++ Created: 19/Sep/12 Updated: 10/Jul/15 Resolved: 19/Sep/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Client |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | J Rassi | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
Using the C++ driver, nothing prevents a user from inserting a document that has two fields which share a name. I don't believe that the behavior of future updates on this document is documented or well-defined (as a sidenote, operating on this document can't crash the server, right?). See:
as a product of:
|
| Comments |
| Comment by Scott Hernandez (Inactive) [ 19/Sep/12 ] |
|
This is a not a bug as bson doesn't exclude duplication of the fields with the same name at the same level. There may be places where this is still used in the server code, like it used to be used in the oplog. If anything the server should be made to disable this during/in objCheck mode (and if we ever make that the default), but this should not be disallowed when generating bson (unless we change the bson spec). |