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

Remove ObjectId's deprecated methods generate, getInc, get_inc, and static get_inc

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • bson-5.0.0
    • Affects Version/s: None
    • Component/s: None
    • 2
    • Needed
    • Not Needed

      Use Case

      The ObjectId class has the following methods that are all deprecated:

      • generate
      • getInc
      • get_inc
      • static get_inc
      • generationTime

      User Impact

      • Migration requires code changes
        • These deprecated methods all output a warning about the preferred method:
        • static getInc() is the preferred method because it's static so it doesn't require an instance of an OID and it's camel case
        • static generate as well is preferred since it doesn't require an instance to call.
        • generationTime edits the current OID instance but there are static alternatives that will create a new OID from a timestamp / fetch a timestamp from an OID.

      Acceptance Criteria

      Implementation Requirements

      • Remove the deprecated methods
      • Update migration

      Testing Requirements

      • Remove tests for these methods

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Bailey Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: