Virtual Population of Field on a Nested Embedded Discriminator Not Working #6411
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?
When trying to perform a virtual population of a field on an embedded discriminator that is at the root of the model, everything is populated correctly. However, when I try do the same on a nested embedded discriminator, the results are not populated. See working and non-working example in repro script section.
If the current behavior is a bug, please provide the steps to reproduce.
Here's are some examples:
Virtual Population WORKING When Embedded Discriminator Field Is At The Root
Virtual Population NOT WORKING When Embedded Discriminator Field Is Nested
What is the expected behavior?
The virtual field at "nested.events.users_$" is populated
Please mention your node.js, mongoose and MongoDB version.
node: 10.0.0
mongoose: 5.0.17
mongodb: 3.6.4
The text was updated successfully, but these errors were encountered: