-
Type: Investigation
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Iteration Iguanodon
-
Not Needed
Use Case
As a driver engineer I want to reduce the difference between node and common driver's spec. Currently our findOneAnd* methods return a wrapped type for the findOneAnd* functions.
User Impact
- This will be a breaking change that will make the ok and lastErrorObject properties inaccessible.
- ok's value is implicit by the method not throwing
- lastErrorObject should likely convert to an error as well so there's no need to provide a way to access it.
Dependencies
Unknowns
- none
Acceptance Criteria
Implementation Requirements
- Make the findOneAnd functions spec compliant by default: update `includeResultMetadata` to default to false
- make sure findOne() also returns results consistent with the other methods (i.e., null instead of undefined for both flag settings)
Testing Requirements
- modify spec test runner to no longer access the value property
- update the default behavior tests
- update any tangential tests that rely on the default behavior to access the value directly or to use the explicit flag setting
Documentation Requirements
- Document change in the migration guide
- DOCSP ticket to update any documented defaults and examples
Follow Up Requirements
- Heads up to dev tools & mongoose
- depends on
-
NODE-3568 Make findOneAnd family of methods spec compliant by default
- Closed