📅  最后修改于: 2022-03-11 15:03:23.453000             🧑  作者: Mango
Post.find({})
.populate([
// here array is for our memory.
// because may need to populate multiple things
{
path: 'user',
select: 'name',
model:'User',
options: {
sort:{ },
skip: 5,
limit : 10
},
match:{
// filter result in case of multiple result in populate
// may not useful in this case
}
}
])
.exec((err, results)=>{
console.log(err, results)
})