When I try to get a promise to return while maintaining the operation on the model instance. I get an error: undefined is not a function
instance.save().exec().then(..)
However, if I try to get a promise with such a model, then it works.
model.find(..).exec().then(..)
Unable to get a promise to keep the action. I am currently just passing a callback to save a function. However, for the sake of consistency, I would like to do all the db operations in the same way.
Muhammad Umer
source share