I have this setup in my MongoDB
Items:
title: String
comments: [] // of objectId\'s
Comments:
user: ObjectId()
item: Ob
I use this:
.populate({
path: 'pathName',
populate: [
{
path: 'FirstSubPathName',
model: 'CorrespondingModel',
},
{
path: 'OtherSubPathName',
model: 'CorrespondingModel',
},
{
path: 'AnotherSubPathName',
model: 'CorrespondingModel',
},
]
});
it's the more easier way that i find to do this.I expect to help. :)