How to paginate subdocument
victormongi opened this issue · comments
Victor Mongi commented
How to paginate subdocument?
Fernando Dorantes commented
Only works for models. You could use a relation model if document count will be "unprocessable".
Victor Mongi commented
Do you have an example?
Thank you for the reply..
Aravind NC commented
@victormongi This plugin will work for the model only to which it is attached. But you can try https://www.npmjs.com/package/mongoose-aggregate-paginate-v2 instead and write an aggregate query.
Victor Mongi commented
@aravindnc do you have example? thank you ...