node.js - mongoose Soft delete using object ID -
so trying use mongoose-delete plugin soft delete data in mongodb, request has got object id mongoose object. in order "soft-delete" data, having first findone, , use delete function on it. there plugin or function can let me soft-delete data using object id? instead of using 2 hits db. data critical, hence need soft delete option, , not hard delete. , cannot use common update function, need plugin, or node module me.
you can use mongoose-delete: https://github.com/dsanel/mongoose-delete.
it provides new delete
function.
Comments
Post a Comment