From d7d1bdd97a2fa88da44321815b53eabd79dcde95 Mon Sep 17 00:00:00 2001 From: romanb Date: Sat, 2 Jun 2007 20:33:41 +0000 Subject: [PATCH] Bugfix for parseData2(). Unrelated to the issues mentioned in my previous commit. --- lib/Doctrine/Hydrate.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/Hydrate.php b/lib/Doctrine/Hydrate.php index c512448bc..c6832b6b9 100644 --- a/lib/Doctrine/Hydrate.php +++ b/lib/Doctrine/Hydrate.php @@ -855,9 +855,9 @@ class Doctrine_Hydrate implements Serializable $relation = $this->_aliasMap[$cache[$key]['alias']]['relation']; // check the type of the relation if ( ! $relation->isOneToOne()) { - if ($prev[$parent][$component] instanceof Doctrine_Record) { + /*if ($prev[$parent][$component] instanceof Doctrine_Record) { throw new Exception(); - } + }*/ $prev[$parent][$component][] = $element; $driver->registerCollection($prev[$parent][$component]); @@ -894,7 +894,8 @@ class Doctrine_Hydrate implements Serializable } } foreach ($currData as $alias => $data) { - $componentName = $this->_aliasMap[$alias]['table']->getComponentName(); + $table = $this->_aliasMap[$alias]['table']; + $componentName = $table->getComponentName(); // component changed $identifiable = $driver->isIdentifiable($currData[$alias], $table);