select method is not removing __t field -__t
#13679
Labels
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
Milestone
Prerequisites
Mongoose version
7.4.0
Node.js version
18.6.1
MongoDB server version
4.1.3
Typescript version (if applicable)
No response
Description
When using the
mongoose.select()
method certain fields are not removed from selection.For example:
mongoose.select('-_id -__v -__t')
removes the_id
and__v
field but not__t
.This has been attempted using both array and string notation.
Steps to Reproduce
mongoose.select('-_id -__v -__t')
Expected Behavior
__t
discriminator field should be removed via select method.The text was updated successfully, but these errors were encountered: