[COMPASS-6338] Investigate changes in NODE-4704: Remove ObjectId's deprecated methods generate, getInc, get_inc, and static get_inc Created: 30/Nov/22  Updated: 12/Jan/23  Resolved: 12/Jan/23

Status: Closed
Project: Compass
Component/s: None
Affects Version/s: None
Fix Version/s: No version

Type: Investigation Priority: Major - P3
Reporter: PM Bot Assignee: Unassigned
Resolution: Done Votes: 0
Labels: node-driver
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on NODE-4704 Remove ObjectId's deprecated methods ... Closed
Related
related to MONGOSH-1358 Update to driver and bson v5.x Closed
Documentation Changes: Not Needed

 Description   

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


 Comments   
Comment by Anna Henningsen [ 12/Jan/23 ]

Covered by MONGOSH-1358.

Generated at Wed Feb 07 22:42:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.