Permalink
Browse files

fix load fixtures for one-to-many relation with FQCN

  • Loading branch information...
1 parent f50df06 commit 55b5e5dbf2a4240dc9478aa98a597a4e09dccc03 @jaugustin jaugustin committed May 4, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 DataFixtures/Loader/AbstractDataLoader.php
View
3 DataFixtures/Loader/AbstractDataLoader.php
@@ -125,6 +125,9 @@ protected function loadDataFromArray($data = null)
foreach ($data as $class => $datas) {
$class = trim($class);
+ if ('\\' == $class[0]) {
+ $class = substr($class, 1);
+ }
$tableMap = $this->dbMap->getTable(constant(constant($class.'::PEER').'::TABLE_NAME'));
$column_names = call_user_func_array(array(constant($class.'::PEER'), 'getFieldNames'), array(BasePeer::TYPE_FIELDNAME));

0 comments on commit 55b5e5d

Please sign in to comment.