Commit b889f427 authored by Jonathan.Wage's avatar Jonathan.Wage

Merged r3134:3135 (fixes #582)

parent e53a659c
......@@ -121,6 +121,9 @@ class Doctrine_Data_Import extends Doctrine_Data
foreach ($row as $key => $value) {
if ($obj->getTable()->hasColumn($key)) {
$obj->set($key, $value);
} else if (method_exists($obj, 'set' . Doctrine::classify($key))) {
$func = 'set' . Doctrine::classify($key);
$obj->$func($value);
} else if ($obj->getTable()->hasRelation($key)) {
if (is_array($value)) {
if (isset($value[0])) {
......@@ -232,11 +235,6 @@ class Doctrine_Data_Import extends Doctrine_Data
$record = $this->_importedObjects[$rowKey];
if( is_array($nestedSet) AND !empty($nestedSet) )
{
$this->_processRow($rowKey, $nestedSet);
}
if( !$parent )
{
$manager->getTable($model)->getTree()->createRoot($record);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment