-
Type: Bug
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: CRUD
JoCat has created PR #3604: fix: passing of ObjectId as a filter in node-mongodb-native
AC
Implementation
- correct the _bsontype check against 'ObjectID' to be 'ObjectId' to correctly identify ObjectId instances.
Testing
- Ensure all find APIs that use the FindOperation class support the syntax of passing an ObjectId directly as a filter
- Ensure the filter always maps _id to the provided ObjectId instance
Follow Up
- File a ticket in the v6 epic about the future support of this functionality, include
- Typescript definition considerations
- API Documentation, deprecation or otherwise communication
- Unsupported similar functionality, ex. lack of support in findAnd* methods
- is depended on by
-
COMPASS-6651 Can't filter documents by directly passing ObjectId to the input
- Open
- is related to
-
NODE-5146 Establish support for ObjectId as the filter argument to find APIs [non-breaking]
- Backlog