Using populate on schema with combined Map of Array<Schema> will not return Array in v6 #12494
Closed
2 tasks done
Labels
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
Milestone
Prerequisites
Mongoose version
6.6.3
Node.js version
14.16.1
MongoDB server version
4.4.3
Description
Using populate on schema with "Map of Array" will ignore the Array part and will return only one Schema object after upgrading from mongoose 5 to 6.
Steps to Reproduce
Expected Behavior
Return the Array of sub elements, not just the first object.
The text was updated successfully, but these errors were encountered: