Skip to content

Virtual Populate not working for me, what i do wrong? #11819

Answered by vkarpov15
jmtt89 asked this question in Q&A
Discussion options

You must be logged in to vote

How are you determining that populate is not returning anything? Remember that virtuals don't end up in console.log() output unless you enable toObject: { virtuals: true } on your schema, or do console.log(user.toObject({ virtuals: true }))

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by jmtt89
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants