Populate seems to jump down to previous .dot level if value does not exist in Types.Mixed. #10191
Labels
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
Milestone
Trying to upgrade one of my project to newest mongoose. its been a while since I had time on this.
I have a mixed Value in my Schema that looks like this:
And the I want to populate some values down the tree. params.value.optionLabels
In mongoose@5.10.2 this works fine and populates the optionLabels with _id and name from correct Model.
In mongoose@5.10.3 i get this error message
Looks like it try to create optionLabels to the 'asd' string (Image from DB end of post). Expected it to ignore this and move on to the next param items.
And this crashes my whole app, even if I have a try catch. Need to restart the server.
Added some images of how the content looks in my DB.
The text was updated successfully, but these errors were encountered: