select('name -path')
should resolve to select('name')
if path
has schema-level select: true
#11694
Labels
Milestone
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
There's currently no way to exclude fields that have schema-level
select: true
in an inclusive projection. Using-path
throws an error:We have tests in
schema.select.test.js
that assert on this behavior, so we can't change this until the next major release. We went most of the way in #11546, which allows using-__t
to exclude the discriminator key.If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
The text was updated successfully, but these errors were encountered: