Author: romanb
Date: 2008-09-13 21:12:08 +0100 (Sat, 13 Sep 2008)
New Revision: 4966

Modified:
   trunk/lib/Doctrine/ORM/Internal/Hydration/StandardHydrator.php
Log:
minor refactoring

Modified: trunk/lib/Doctrine/ORM/Internal/Hydration/StandardHydrator.php
===================================================================
--- trunk/lib/Doctrine/ORM/Internal/Hydration/StandardHydrator.php      
2008-09-13 20:06:49 UTC (rev 4965)
+++ trunk/lib/Doctrine/ORM/Internal/Hydration/StandardHydrator.php      
2008-09-13 20:12:08 UTC (rev 4966)
@@ -266,16 +266,16 @@
                                 $driver->getElement($data, $entityName));
                     }
                 }
+                
                 if ($hydrationMode == Doctrine_Query::HYDRATE_ARRAY) {
-                    if (($coll =& $driver->getReferenceValue($baseElement, 
$relationAlias)) !== null) {
-                        $this->_updateResultPointer($resultPointers, $coll, 
$index, $dqlAlias, $oneToOne);   
-                    }
+                    $coll =& $driver->getReferenceValue($baseElement, 
$relationAlias);
                 } else {
-                    if (($coll = $driver->getReferenceValue($baseElement, 
$relationAlias)) !== null) {
-                        $this->_updateResultPointer($resultPointers, $coll, 
$index, $dqlAlias, $oneToOne);   
-                    }
+                    $coll = $driver->getReferenceValue($baseElement, 
$relationAlias);
                 }
-
+                
+                if ($coll !== null) {
+                    $this->_updateResultPointer($resultPointers, $coll, 
$index, $dqlAlias, $oneToOne); 
+                }
             }
             
             // append scalar values to mixed result sets


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"doctrine-svn" group.
 To post to this group, send email to [email protected]
 To unsubscribe from this group, send email to [EMAIL PROTECTED]
 For more options, visit this group at 
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---

Reply via email to