#10367·mongoose

[Feature] support named parameters

Author: AbdelrahmanHafezCreated Jun 17, 2021Updated Sep 8, 2026
Labelsenhancement

re https://github.com/Automattic/mongoose/pull/10360#issuecomment-862245274 It would be nice if we support named parameters for mongoose methods. It should be straightforward to implement, I'll start with the following:

  • Model.find
  • Model.findOne
  • Model.updateOne
  • Model.updateMany
  • Model.countDocuments
  • Model.validate
  • Model.aggregate
  • Model.exists

Then we can decide what other functions we can apply the pattern to.