-
Type: Investigation
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
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
- depends on
-
NODE-4704 Remove ObjectId's deprecated methods generate, getInc, get_inc, and static get_inc
- Closed
- related to
-
MONGOSH-1358 Update to driver and bson v5.x
- Closed