Arrays on nested object are emptied on save if an other object of the same parent object is in projection #13043
Closed
2 tasks done
Labels
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
Milestone
Prerequisites
Mongoose version
6.9.2
Node.js version
18.12.1
MongoDB server version
4.2.23
Typescript version (if applicable)
No response
Description
If a projection is made on a nested object on find, the arrays defined in the parent object are emptied on save.
Steps to Reproduce
Expected Behavior
The arrays not projected must not be emptied on save
The text was updated successfully, but these errors were encountered: