6.x erroring with $not cannot be empty
when using $size
operator
#10716
Labels
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
Milestone
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Unable to query for documents using
{someArray: {$not: {$size: 0}}}
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
To find the document:
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Mongoose 6.0.5
MongoDB shell version v4.2.8
NodeJS 16.3.0
This was working ok in Mongoose 5.x
The text was updated successfully, but these errors were encountered: