Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model.aggregate.then is not a function #3946

Closed
adamreisnz opened this issue Mar 5, 2016 · 3 comments
Closed

Model.aggregate.then is not a function #3946

adamreisnz opened this issue Mar 5, 2016 · 3 comments
Labels
new feature This change adds new functionality, like a new method or class
Milestone

Comments

@adamreisnz
Copy link
Contributor

It seems the aggregate method on models is not thenable, is this intentional or an accidental omission?

@vkarpov15
Copy link
Collaborator

Intentional. Use the .exec() function. We'll add a .then() that does this for you in a future release

@vkarpov15 vkarpov15 added this to the 4.5 milestone Mar 6, 2016
@vkarpov15 vkarpov15 added the new feature This change adds new functionality, like a new method or class label Mar 6, 2016
@adamreisnz
Copy link
Contributor Author

Ok that'd be great. I use the promises interface for all other Mongoose operations, so would be good if it can be consistent with aggregate as well. Thanks!

@TrejGun
Copy link
Contributor

TrejGun commented May 13, 2016

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature This change adds new functionality, like a new method or class
Projects
None yet
Development

No branches or pull requests

3 participants