Problem is when there is an error in course insertion (such as missing model required fields and virtual foreignKey errors), all insertion rollback but afterCreate event in Users model & EmailConfirmations model calls and email sent to user without any record in confirmation table!

Why thoes events run if nothing inserted into tables, and what can I do to make this works?