From 1ab1ba298659d027e70192c8dafa961efefc3d79 Mon Sep 17 00:00:00 2001 From: Andrey Kutejko Date: Mon, 29 Jul 2013 23:16:46 +0300 Subject: [PATCH] transactions in fixtures --- ipf/command/fixtures.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ipf/command/fixtures.php b/ipf/command/fixtures.php index 46f169a..22266da 100644 --- a/ipf/command/fixtures.php +++ b/ipf/command/fixtures.php @@ -35,6 +35,7 @@ class IPF_Command_Fixtures $records = $fixture['records']; echo "Loading $modelClass "; $table = IPF_ORM::getTable($modelClass); + $table->getConnection()->beginTransaction(); foreach ($records as $record) { $query = $table ->createQuery() @@ -54,6 +55,7 @@ class IPF_Command_Fixtures $model->save(); echo '.'; } + $table->getConnection()->commit(); echo "\n"; } } -- 2.49.0