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

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

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None

    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

            sam.kleinman Sam Kleinman (Inactive)
            epc Ed Costello
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              10 years, 33 weeks ago