Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #148 from jaugustin/fix-load-fixtures-with-one-to-…

…many-fqcn

fix load fixtures for one-to-many relation with FQCN
  • Loading branch information...
commit 35dbf79170380107f71dade7e260c60ac812daef 2 parents f50df06 + 5998eca
@willdurand willdurand authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 DataFixtures/Loader/AbstractDataLoader.php
View
5 DataFixtures/Loader/AbstractDataLoader.php
@@ -124,7 +124,10 @@ protected function loadDataFromArray($data = null)
}
foreach ($data as $class => $datas) {
- $class = trim($class);
+ $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));
Please sign in to comment.
Something went wrong with that request. Please try again.