]> git.andy128k.dev Git - ipf.git/commitdiff
minor fixtures optimization
authorAndrey Kutejko <andy128k@gmail.com>
Mon, 29 Jul 2013 20:06:07 +0000 (23:06 +0300)
committerAndrey Kutejko <andy128k@gmail.com>
Mon, 29 Jul 2013 20:06:07 +0000 (23:06 +0300)
ipf/command/fixtures.php

index 0ed9fff35d4f1fa9c0c7b90508e16a9e631aa3c0..46f169ac9ddf04ef7bfed6b9e985deabd37df87a 100644 (file)
@@ -34,8 +34,9 @@ class IPF_Command_Fixtures
                 $key = array($key);
             $records = $fixture['records'];
             echo "Loading $modelClass ";
+            $table = IPF_ORM::getTable($modelClass);
             foreach ($records as $record) {
-                $query = IPF_ORM::getTable($modelClass)
+                $query = $table
                     ->createQuery()
                     ->limit(1);
                 foreach ($key as $k)