document.populate() throws an error when populating an array of immutable items #10159
Labels
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
has repro script
There is a repro script, the Mongoose devs need to confirm that it reproduces the issue
Milestone
Do you want to request a feature or report a bug?
Report a bug.
What is the current behavior?
When calling
document.populate()
with a path to an array whose elements are marked asimmutable
, Mongoose throws the following error:If the current behavior is a bug, please provide the steps to reproduce.
Repro script. Using module syntax, save in
something.mjs
and it should run fine w/node
.What is the expected behavior?
The field's array elements should be populated, and no error should be thrown.
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Node:
15.14.0
Mongoose:
5.12.5
(but it seems to have broken in5.11.10
, as5.11.9
is the last version where this worked fine)MongoDB:
4.2.11
The text was updated successfully, but these errors were encountered: