Closed rijin-newage closed 1 month ago
What is the use-case where you want to use both soft and hard delete for the same model? You could always use the underlying connection to bypass the soft delete for a collection. mongoose.connection.collection(Model.collection.name).deleteMany({})
Default
Model.deleteMany()
function is replaced, so there is no option for hard delete documents. There should be a way to passforce: true
option which will do a hard delete.Note:
Model.remove()
is deprecated.