These are chat archives for Automattic/mongoose

Sep 2015
Muhammad Zubair
Sep 04 2015 11:12
Valeri Karpov
Sep 04 2015 13:23
@EricMcRay please open up an issue with schemas and example data, too much info for quick gitter question :)
Erinç Fırtına
Sep 04 2015 14:02

@vkarpov15 yes I know, I am going to do that when I have free time. But right now I have an other question :D

content: String,
comments: [{
text: String,
user: ObjectId,
userType: String,

My scheme is like this. I want to populate comments user by userType. I store model name at userType field. How can I do this?

Valeri Karpov
Sep 04 2015 17:32
Set refPath to comments.userType, see Automattic/mongoose#2640 for examples. dynref is not really well documented atm, but that should work. @chetverikov would know more, he wrote it and pushed it through :)