Open nicholasfoden opened 1 year ago
Currently I cannot see a way to perform a
delete()
on a document using a transaction.Would it be possible to add an
options
object to the arguments in the same way mongoose's remove method currently does?Proposed example usage
async function myRemoveMethod(myQuery, mySession) { const mydoc = await myModel.findOne(myQuery).session(mySession) mydoc.delete(deletedBy, { session: mySession }, callback) }
Thanks for looking at this issue 🙏
How about this?
await myModel.delete(myQuery).session(session) <-
Currently I cannot see a way to perform a
delete()
on a document using a transaction.Would it be possible to add an
options
object to the arguments in the same way mongoose's remove method currently does?Proposed example usage
Thanks for looking at this issue 🙏