-
-
Notifications
You must be signed in to change notification settings - Fork 3.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
Nonexistent fields get omitted from query #11048
Comments
I can understand removing nonexistent fields from |
|
@vkarpov15 The option is not working for me (with Mongoose |
@florianwalther-private make sure you do |
Sorry, I forgot to update this. My mistake was that I called it after setting up my routes (which in turn had dependencies on the models). It's all working now, I just needed to call it early enough :) |
Do you want to request a feature or report a bug?
Bug.
What is the current behavior?
Nonexistent fields get omitted from query which yields unexpected results.
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
it shouldn't return any documents.
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Node.js: v16.13.0
Mongoose: v6.0.14
MongoDB: v5.0.4
The text was updated successfully, but these errors were encountered: