-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Depopulate not working for populated docs inside array #10592
Labels
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
Milestone
Comments
vkarpov15
added
the
has repro script
There is a repro script, the Mongoose devs need to confirm that it reproduces the issue
label
Aug 24, 2021
IslandRhythms
added
can't reproduce
Mongoose devs have been unable to reproduce this issue. Close after 14 days of inactivity.
and removed
has repro script
There is a repro script, the Mongoose devs need to confirm that it reproduces the issue
labels
Aug 24, 2021
The last console.log() returns false when it should return true
|
IslandRhythms
added
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
and removed
can't reproduce
Mongoose devs have been unable to reproduce this issue. Close after 14 days of inactivity.
labels
Aug 24, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
A schema containing an array of documents with a nested reference inside of the document in the array does not depopulate correctly.
If the current behavior is a bug, please provide the steps to reproduce.
The following is a test to reproduce the error. The
band.members
andband.lead
is depopulated correctly, but theband.embeddedMembers
are not.What is the expected behavior?
The array with nested population should depopulate.
I suspect the $set is not taking into account the array indexes here :
mongoose/lib/document.js
Line 4206 in a803885
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Node.js -> v14.17.5
mongoose -> 5.13.8
MongoDB -> 5.0.2
The text was updated successfully, but these errors were encountered: