Consistently return Promises from Model-Queries on .exec()
#7307
Labels
discussion
If you have any thoughts or comments on this issue, please share them!
.exec()
#7307
Do you want to request a feature or report a bug?
Some kind of feature, more a question/discussion
What is the current behavior?
Model.create()
returns a Promise, whileModel.find/otherQuery
returns a DocumentQuery-Object.What is the expected behavior?
The Model-Functions should maybe behave in the same way, so that
Model.create()
also returns a DocumentQuery/Query and onlyModel.create().exec()
returns the Promise.This is more a consistency thing i stumbled across at this moment and i am wondering if there is a good reason to do this the way it is right now :)
Please mention your node.js, mongoose and MongoDB version.
All latest versions
The text was updated successfully, but these errors were encountered: