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

Create command should take idIndex option

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.0-rc2
    • Component/s: Querying
    • Labels:
      None

      Description

      The create command should take the full _id index spec as the idIndex option.

      > db.runCommand({create: "c", 
      idIndex: {v: 1, key: {_id: 1}, name: “_id_”, ns: “test.c”}})
      

      Required options are "key" and "name". "key" must be _id: 1 and "name" must be "_id_". No options are allowed other than "key", "name", "v", "ns", and "collation".

      If the "collation" differs from the collection default collation, we reject the command. If "collation" is not present, the _id index inherits the collection default collation.

      If "v" is not present, it is set to 2 if featureCompatibilityVersion=3.4 and 1 if featureCompatibilityVersion=3.2.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tess.avitabile Tess Avitabile
              Reporter:
              tess.avitabile Tess Avitabile
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: