Commit 234253ed authored by romanb's avatar romanb

Perf. improvement on hydrating joined resultsets, part 2.

parent 3d8a37b2
......@@ -180,8 +180,6 @@ class Doctrine_Hydrator extends Doctrine_Hydrator_Abstract
$listeners[$componentName]->preHydrate($event);
//--
$element = $driver->getElement($data, $componentName);
$parent = $map['parent'];
$relation = $map['relation'];
$relationAlias = $map['relation']->getAlias();
......@@ -198,6 +196,7 @@ class Doctrine_Hydrator extends Doctrine_Hydrator_Abstract
// append element
if (isset($nonemptyComponents[$dqlAlias])) {
if ( ! isset($identifierMap[$path][$id[$parent]][$id[$dqlAlias]])) {
$element = $driver->getElement($data, $componentName);
// just event stuff
$event->set('data', $element);
$listeners[$componentName]->postHydrate($event);
......@@ -228,6 +227,7 @@ class Doctrine_Hydrator extends Doctrine_Hydrator_Abstract
if ( ! isset($nonemptyComponents[$dqlAlias])) {
$prev[$parent][$relationAlias] = $driver->getNullPointer();
} else {
$element = $driver->getElement($data, $componentName);
$prev[$parent][$relationAlias] = $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