doctrine / data-fixtures

Doctrine2 ORM Data Fixtures Extensions
http://www.doctrine-project.org
MIT License
2.78k stars 223 forks source link

Implicit transaction commit in mysql TRUNCATE causes error "There is no active transaction." #448

Open jakubthedeveloper opened 1 year ago

jakubthedeveloper commented 1 year ago

In ORMExecutor the code for purging db tables and loading fixtures is wrapped in one transaction.

If I try to purge tables with TRUNCATE (because I want to reset auto-increments) the transaction is implicitly closed and in the next step, when the fixtures are loaded I get: "There is no active transaction."

Any ideas how to fix it properly?