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

Docs should specify that _id fields cannot be regexes or undefined

      Description

      From the docs:
      "The _id field may contain values of any BSON data type, other than an array."

      https://docs.mongodb.com/manual/core/document/#the-_id-field

      However, regexes and undefined are also disallowed as values for _id. The docs should be updated to reflect this restriction. Code:
      https://github.com/mongodb/mongo/blob/cf55779be0b1ed2f12c71e13e634b81007094777/src/mongo/db/ops/insert.cpp#L137-L144

       

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

            Assignee:
            alison.huh@mongodb.com Alison Huh
            Reporter:
            alya.berciu@mongodb.com Alya Berciu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              2 years, 39 weeks, 5 days ago