Populate does not work with refPath
and discriminated nested array
#9153
Labels
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
Milestone
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
We have a schema with (1) nested documents, which (2) use discriminators, and where (3) some of the discriminated types uses a
refPath
. When usingModel.find()
, these references are not populated, whereas when getting a single document with e.g.Model.findById()
, the references are properly populated.(probably related and/or regressions of earlier filed tickets #8837, #8731)
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
Both tests should pass and the
foo
property should be properly populated.What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
The text was updated successfully, but these errors were encountered: