ivmarcos/sequelize-version

Add AfterBulkDestroy hook

Closed this issue · 2 comments

Is it possible to add a hook for bulk destroys, we have cases where we need to check the history of objects which may have been deleted in a bulk transaction.

Hi there @sumac13 ! Which sequelize version are you using? Please try setting the individualHooks flag in the options, for instance Model.destroy({ where: {accessLevel: 0}, individualHooks: true})

Thanks @ivmarcos I've added the individualHooks flag and this is working for us now, appreciate the quick reply.