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

Methods Added to Schema Should Return Promises #33

Open
killercup opened this issue Jan 18, 2014 · 5 comments
Open

Methods Added to Schema Should Return Promises #33

killercup opened this issue Jan 18, 2014 · 5 comments

Comments

@killercup
Copy link

Almost all Mongoose methods return promises (using the mpromisemodule), but the methods added by this module don't.

E.g.: User.findOne({name: me}).exec() vs. User.findByUsername(name, callback)

It's not a big deal, just something I noticed. I guess this could be easily added without changing the callback arguments.

@saintedlama
Copy link
Owner

Sounds good, I'm taking a look how to implement that.

@siboulet
Copy link

+1

@ZhengHe-MD
Copy link

please...

@pr1ntr
Copy link

pr1ntr commented May 15, 2017

+1

@watzon
Copy link

watzon commented Dec 6, 2017

This would be nice as it would also allow the use of async/await

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants