Commit e45ae7d0 authored by zYne's avatar zYne

--no commit message

--no commit message
parent 4eac440c
...@@ -1024,6 +1024,7 @@ class Doctrine_Hydrate extends Doctrine_Object implements Serializable ...@@ -1024,6 +1024,7 @@ class Doctrine_Hydrate extends Doctrine_Object implements Serializable
} }
} }
// dealing with root component // dealing with root component
$table = $this->_aliasMap[$rootAlias]['table']; $table = $this->_aliasMap[$rootAlias]['table'];
$componentName = $table->getComponentName(); $componentName = $table->getComponentName();
...@@ -1033,8 +1034,9 @@ class Doctrine_Hydrate extends Doctrine_Object implements Serializable ...@@ -1033,8 +1034,9 @@ class Doctrine_Hydrate extends Doctrine_Object implements Serializable
$index = $driver->search($element, $array); $index = $driver->search($element, $array);
if ($index === false) { if ($index === false) {
if (isset($map['map'])) { if (isset($this->_aliasMap[$rootAlias]['map'])) {
$key = $map['map']; $key = $this->_aliasMap[$rootAlias]['map'];
if (isset($array[$key])) { if (isset($array[$key])) {
throw new Doctrine_Hydrate_Exception("Couldn't hydrate. Found non-unique key mapping."); throw new Doctrine_Hydrate_Exception("Couldn't hydrate. Found non-unique key mapping.");
} }
...@@ -1042,6 +1044,7 @@ class Doctrine_Hydrate extends Doctrine_Object implements Serializable ...@@ -1042,6 +1044,7 @@ class Doctrine_Hydrate extends Doctrine_Object implements Serializable
if ( ! isset($element[$key])) { if ( ! isset($element[$key])) {
throw new Doctrine_Hydrate_Exception("Couldn't hydrate. Found a non-existent key."); throw new Doctrine_Hydrate_Exception("Couldn't hydrate. Found a non-existent key.");
} }
$array[$element[$key]] = $element; $array[$element[$key]] = $element;
} else { } else {
$array[] = $element; $array[] = $element;
......
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