Getters are not being applied correctly to arrays in lean queries. This seems to be have been broken with the release of mongoose@7.5.0 as it is working as expected in mongoose@7.4.5.
If the current behavior is a bug, please provide the steps to reproduce.
Do you want to request a feature or report a bug?
bug
What is the current behavior?
Getters are not being applied correctly to arrays in lean queries. This seems to be have been broken with the release of
mongoose@7.5.0
as it is working as expected inmongoose@7.4.5
.If the current behavior is a bug, please provide the steps to reproduce.
Please notice that the
upper
getter is not being applied to theemails
array field:What is the expected behavior?
The
upper
getter is applied to theemails
array field and the above code logs the following:What are the versions of Node.js, mongoose-lean-getters, and Mongoose are you are using? Note that "latest" is not a version.
node: 16.20.2 mongoose: 7.5.2 mongoose-lean-getters: 1.1.0