Changeset 4707

Show
Ignore:
Timestamp:
07/23/08 22:25:44 (4 months ago)
Author:
guilhermeblanco
Message:

Better solution to ticket #1268.

Location:
branches
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/0.11/lib/Doctrine/Tree/NestedSet.php

    r4706 r4707  
    161161        $q = $this->returnQueryWithRootId($q, $rootId); 
    162162         
    163         // FIX: Reported in ticket #1268 
    164         if ($hydrationMode !== null) { 
    165             $q = $q->setHydrationMode($hydrationMode); 
    166         } 
    167  
    168         $tree = $q->execute(); 
     163        $tree = $q->execute(array(), $hydrationMode); 
    169164 
    170165        if (count($tree) <= 0) { 
     
    199194        $q = $this->returnQueryWithRootId($q, $record->getNode()->getRootValue()); 
    200195         
    201         // FIX: Reported in ticket #1268 
    202         if ($hydrationMode !== null) { 
    203             $q = $q->setHydrationMode($hydrationMode); 
    204         } 
    205  
    206         return $q->execute(); 
     196        return $q->execute(array(), $hydrationMode); 
    207197    } 
    208198 
  • branches/1.0/lib/Doctrine/Tree/NestedSet.php

    r4706 r4707  
    161161        $q = $this->returnQueryWithRootId($q, $rootId); 
    162162 
    163         // FIX: Reported in ticket #1268 
    164         if ($hydrationMode !== null) { 
    165             $q = $q->setHydrationMode($hydrationMode); 
    166         } 
    167  
    168         $tree = $q->execute(); 
     163        $tree = $q->execute(array(), $hydrationMode); 
    169164 
    170165        if (count($tree) <= 0) { 
     
    198193                ->addOrderBy($this->_baseAlias . ".lft asc"); 
    199194        $q = $this->returnQueryWithRootId($q, $record->getNode()->getRootValue()); 
    200          
    201         // FIX: Reported in ticket #1268 
    202         if ($hydrationMode !== null) { 
    203             $q = $q->setHydrationMode($hydrationMode); 
    204         } 
    205  
    206         return $q->execute(); 
     195 
     196        return $q->execute(array(), $hydrationMode); 
    207197    } 
    208198