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

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

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Environment:

      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?

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

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