1
0
mirror of synced 2025-01-31 04:21:44 +03:00

minor tweak to get tiny perf. improvement

This commit is contained in:
romanb 2008-09-13 20:29:44 +00:00
parent 8615e8e90e
commit 2aa542841f

View File

@ -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) {