This commit is contained in:
Kévin Gomez 2014-09-15 13:37:23 +01:00
parent 530403636a
commit 23c05811d7
7 changed files with 55 additions and 58 deletions

View file

@ -253,7 +253,7 @@ abstract class AbstractDataLoader extends AbstractDataHandler implements DataLoa
$reflectionClass = new \ReflectionClass($parentClass);
if (!$reflectionClass->isAbstract()) {
$parentObj = new $parentClass;
$parentObj = new $parentClass();
$parentObj->fromArray($obj->toArray());
$this->saveParentReference($parentClass, $key, $parentObj);
}

View file

@ -61,7 +61,7 @@ class YamlDataLoader extends AbstractDataLoader
}
ob_start();
$retval = include($file);
$retval = include $file;
$content = ob_get_clean();
// if an array is returned by the config file assume it's in plain php form else in YAML

View file

@ -153,7 +153,6 @@ YAML;
$this->assertRegexp('#[\w ]+#', $book->getDescription());
}
public function testYamlLoadManyToMany()
{
$schema = <<<XML

View file

@ -541,7 +541,6 @@ abstract class Book implements ActiveRecordInterface
{
try {
$col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : BookTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
$this->id = (null !== $col) ? (int) $col : null;
@ -1093,7 +1092,7 @@ abstract class Book implements ActiveRecordInterface
$copyObj->setAuthorId($this->getAuthorId());
if ($makeNew) {
$copyObj->setNew(true);
$copyObj->setId(NULL); // this is a auto-increment column, so set to default value
$copyObj->setId(null); // this is a auto-increment column, so set to default value
}
}
@ -1129,7 +1128,7 @@ abstract class Book implements ActiveRecordInterface
public function setAuthor(ChildAuthor $v = null)
{
if ($v === null) {
$this->setAuthorId(NULL);
$this->setAuthorId(null);
} else {
$this->setAuthorId($v->getId());
}
@ -1145,7 +1144,6 @@ abstract class Book implements ActiveRecordInterface
return $this;
}
/**
* Get the associated ChildAuthor object
*