You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vkarpov15
added
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
and removed
has repro script
There is a repro script, the Mongoose devs need to confirm that it reproduces the issue
labels
Oct 1, 2019
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Calling
.set
on the parent model with themerge
option set to true, does not merge subdocuments.If the current behavior is a bug, please provide the steps to reproduce.
Sample Schema:
With a Person already stored as:
And if I call something like the following:
Address is set to simply
{ street: 'Fake Street' }
and is not merged.It might be worth noting too that
person.address.isNew
is still false howeverWhat is the expected behavior?
The person object should be updated to:
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Mongoose: 5.7.1
Mongodb: 4.0.6
The text was updated successfully, but these errors were encountered: