Closed adamspe closed 8 years ago
Currently the default delete implementation uses model.remove({},callback) however when going this route the schema.post('remove',callback) hook is not invoked.
model.remove({},callback)
schema.post('remove',callback)
http://mongoosejs.com/docs/middleware.html documents this fact and it's working to spec.
Should instead find the document and use document.remove(callback).
document.remove(callback)
fixed in v0.1.4
Currently the default delete implementation uses
model.remove({},callback)
however when going this route theschema.post('remove',callback)
hook is not invoked.http://mongoosejs.com/docs/middleware.html documents this fact and it's working to spec.
Should instead find the document and use
document.remove(callback)
.