Commit 2aa54284 authored by romanb's avatar romanb

minor tweak to get tiny perf. improvement

parent 8615e8e9
......@@ -247,8 +247,7 @@ class Doctrine_ORM_Internal_Hydration_StandardHydrator extends Doctrine_ORM_Inte
}
} else if ( ! isset($baseElement[$relationAlias])) {
if ($hydrationMode == Doctrine_Query::HYDRATE_ARRAY) {
$array = array();
$driver->setRelatedElement($baseElement, $relationAlias, $array);
$baseElement[$relationAlias] = array();
} else {
$driver->setRelatedElement($baseElement, $relationAlias,
$driver->getElementCollection($entityName));
......@@ -268,9 +267,9 @@ class Doctrine_ORM_Internal_Hydration_StandardHydrator extends Doctrine_ORM_Inte
}
if ($hydrationMode == Doctrine_Query::HYDRATE_ARRAY) {
$coll =& $driver->getReferenceValue($baseElement, $relationAlias);
$coll =& $baseElement[$relationAlias];
} else {
$coll = $driver->getReferenceValue($baseElement, $relationAlias);
$coll = $baseElement->_internalGetReference($relationAlias);
}
if ($coll !== null) {
......
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