You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched existing issues to ensure the bug has not already been reported
Mongoose version
8.9.3
Node.js version
22.11.0
MongoDB server version
7.0.15
Typescript version (if applicable)
5.7.2
Description
I previously used a plugin to support Int32 in schemas. With the latest version of Mongoose I could drop this plugin.
However, the queries that used to work now no longer works.
It seems to turn the query value from a number into null.
The database then throws an error for invalid querying.
The error it throws:
MongoServerError: myField takes an Array, a number, or a BinData but received: $bitsAnySet: null
The text was updated successfully, but these errors were encountered:
KeyboardRage
changed the title
Bit values in a $bit query to Int32 type fields does not work
Bitwise query on Int32 field throws server error
Jan 9, 2025
vkarpov15
added
has repro script
There is a repro script, the Mongoose devs need to confirm that it reproduces the issue
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
and removed
has repro script
There is a repro script, the Mongoose devs need to confirm that it reproduces the issue
labels
Jan 9, 2025
Prerequisites
Mongoose version
8.9.3
Node.js version
22.11.0
MongoDB server version
7.0.15
Typescript version (if applicable)
5.7.2
Description
I previously used a plugin to support Int32 in schemas. With the latest version of Mongoose I could drop this plugin.
However, the queries that used to work now no longer works.
It seems to turn the query value from a number into
null
.The database then throws an error for invalid querying.
The error it throws:
Steps to Reproduce
I can reproduce it with this setup.
Expected Behavior
The DB will find the record and return it.
The text was updated successfully, but these errors were encountered: