Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-1561

Does mongod create an ObjectId for a missing _id field or not?

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:
    • Last comment by Customer:
      true

      Description

      First there's: "the mongod adds the _id field and generates a unique ObjectId to assign as its value." but later in the *Important* note there is this:

      "Clock skew between clients can also result in non-strict ordering even for values, because client drivers generate ObjectId values, not the mongod process."

      Which is it? Is it the case that the client driver could create an _id field with a local ObjectId, but if it didn't then the mongod creates it?

        Attachments

          Activity

            People

            Assignee:
            sam.kleinman Sam Kleinman (Inactive)
            Reporter:
            epc Ed Costello
            Participants:
            Last commenter:
            Jonathan Dahl Jonathan Dahl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since reply:
              8 years, 17 weeks ago
              Date of 1st Reply: