Skip to content

Support filter / search / sort in the populate #30

@chintanshahts

Description

@chintanshahts

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 } }
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions