I am doing unit testing and I expect that all data committed to the MySQL database will be rolled back... but this isn\'t the case. The data is being committed, even though my
Another way to fix your problem:
Instead of using:
org.hibernate.dialect.MySQLDialect
, which creates a MyISAM table by default, hence not supporting transactions
Try using
org.hibernate.dialect.MySQLInnoDBDialect
, which creates InnoDB tables, and thus supports transactions.