Mongoose 6: Populate not working on array field with defined subdocument schema #13303
Unanswered
skrishnan22
asked this question in
Q&A
Replies: 1 comment 1 reply
-
On further debugging, noticed this
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
These are my schemas
user.js
company.js
On running
in mongoose 5, companies.details is being populated correctly, but in mongoose 6 the populate is not happening
The populate works in mongoose 6, if I change the User schema as below. Note the change to companies field
Is this expected change when migrating from 5 to 6 and if so what is the best way to make it work with versions 6 and above
Beta Was this translation helpful? Give feedback.
All reactions