-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Critical - P2
-
None
-
Affects Version/s: None
-
Query Execution
-
Major Change
-
(copied to CRM)
Disallow writing new documents with duplicate field names at the same level, like:
{a:1, a:2}
In previous versions of mongodb, updates could be written to produce duplicate fields, but can no longer be as of 2.6.
For existing data, one should be able to replace the existing "bad" documents with "fixed" versions.
Note: Documents which already exist should still be replicated and migrated during system operations, but cannot be modified without "fixing" them.
Clients: Some client will error if they encounter duplicate field names in a document, like .net; in javascript and other languages one of the fields may be hidden or lost since the native storage is a map where keys (field names) are unique.
- is duplicated by
-
SERVER-30393 MongoDB is accepting duplicate elements within the same level
- Closed
-
SERVER-7070 Insertion of document with duplicate fields permitted in C++
- Closed
-
SERVER-41354 Resultset change with 2x $or clauses at same level
- Closed
-
SERVER-42018 $expr operators are not implicitly ANDed in compound queries
- Closed
-
SERVER-22885 Unable to find some of filed in document which were imported by mondoimport.
- Closed
- is related to
-
SERVER-19361 Insert of document with duplicate _id fields should be forbidden
- Closed
-
SERVER-9637 Upsert with filters for a subdocument and a nested subdocument key result with an invalid BSON. (one document with two duplicate keys!)
- Closed
-
SERVER-17902 findAndModify returns document with duplicated value field
- Closed
-
SERVER-36999 mongo shell doesn't support inserting documents with duplicate field names
- Closed
-
SERVER-24048 Value missing in case of Duplicate Field Name Insertion
- Closed
- related to
-
CSHARP-4040 Serialization ignores discriminator field when checking for duplicate field names
- Backlog
-
SERVER-19642 createIndexes command allows duplicate element names in index spec
- Closed
-
SERVER-95983 Importing document with duplicate definitions can bring db into inconsistent state
- Closed