mongoose-query-parser icon indicating copy to clipboard operation
mongoose-query-parser copied to clipboard

Support filter / search / sort in the populate

Open chintanshahts opened this issue 1 year ago • 1 comments

mongoose populate with sort

WizardModel.find({})
.populate({
path: 'spells',
options: { sort: [['damages', 'asc']] }
})

mongoose populate with match


WizardModel.find({})
.populate({
path: 'spells',
match: { level_required: { $gte: 3 } }
})

chintanshahts avatar Apr 14 '23 05:04 chintanshahts

@leodinas-hao any planning on this?

chintanshahts avatar Jul 07 '23 05:07 chintanshahts