-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Document set merge doesn't work for multi layer nested documents #14861
Comments
I've taken a look into the code and found this code snippet this is on line 1212 of mongoose/lib/document.js
It looks like the merge option is lost when the second nested object is set I've tested out adding the options to the next $set call and it looks like it works 👀 Would this be something I could open a pr to implement or is there a reason for the behaviour? I'm new to looking at the source code for mongoose so any help would be appreciated 😃 |
+1 |
Should be fixed by #14870 |
Prerequisites
Mongoose version
8.6.0
Node.js version
18.15.0
MongoDB server version
NA
Typescript version (if applicable)
No response
Description
When using document set with the merge option set to true if there are multiple nested fields the deeply nested fields are ignored
Steps to Reproduce
Expected Behavior
For this code example I get
I would expect to get
The text was updated successfully, but these errors were encountered: