-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(NODE-5126): find operations fail when passed an ObjectId as filter #3604
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for bringing this to our attention and providing a fix @JoCat! I've just added some tests I'll get my colleagues to look at and we can move this along
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few small changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
What is changing?
This PR fixes an error related to the definition of the ObjectId passed to the filter.
Is there new documentation needed for these changes?
no
What is the motivation for this change?
It seems that after merge PR #3490 the value of _bsontype for ObjectId has changed.
Before update 5.0 "ObjectId._bsontype" is defined as "ObjectID", after "ObjectId".
Because of this, passing it in functions such as findOne() causes an error.
Double check the following
npm run check:lint
scripttype(NODE-xxxx)[!]: description
feat(NODE-1234)!: rewriting everything in coffeescript