Mongoose post-remove event doesn't fire
问题 I have this code in my model: ContentSchema.post( 'remove', function( item ) { index.deleteObject( item._id ) }) Here's what's in my controller: Content.find( { user: user, _id: contentId } ) .remove( function ( err, count ) { if ( err || count == 0 ) reject( new Error( "There was an error deleting that content from the stream." ) ) resolve( "Item removed from stream" ) }) I expect that when the function in the controller runs, the function in the model should happen. I can see in the