1

Can anyone please explain to me what is the use of core_abstract_delete_after and core_abstract_delete_commit_after events in magento 2.

For your information, it is declared in (Magento\Framework\Model\AbstractModel) this abstract class.

If it is possible so please let me know how can I test it.

1 Answer 1

1

Saving happens in a MySQL transaction and the delete_after event is triggered before the transaction is committed, so that you can do additional updates in the database within the same transaction.

The delete_commit_after event is triggered after the transaction has been committed, i.e. when the changes were written to the database.

2
  • Thank you for your answer I have one more question - Are both events call on any MySQL transaction? May 3, 2019 at 5:20
  • @deexiysanghani yes both are called MySql transaction one is before other is after. May 3, 2019 at 9:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.