Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-6439

Duplicate fields at the same level should not be allowed

    • Query Execution
    • Major Change

      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.

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            9 Vote for this issue
            Watchers:
            34 Start watching this issue

              Created:
              Updated: