Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-3826

Investigate NODE-3825 - _id of Document

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Not Needed

      The _id field of the Document type should be of type any, rather exclusively ObjectId when using the driver with TypeScript. In MongoDB, the _id field is required in all documents but can be of many types (ObjectId, string, int, etc.). In TypeScript driver, compiler errors will arise when inserting documents with the _id field set to non-ObjectId types. This then requires odd workarounds, explicitly setting things to the any type.
      NODE-3825 Description

            Assignee:
            bailey.pearson@mongodb.com Bailey Pearson
            Reporter:
            dbeng-pm-bot PM Bot
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: