Show
Ignore:
Timestamp:
07/23/08 22:21:13 (6 months ago)
Author:
guilhermeblanco
Message:

Fixes #1268 and fixes #1260. Fixed test case of #1250. Updated documentation to support changes. Remove BC break of fetchTree and also Pager is now aware of Hydration mode defined in Query object.

Files:
1 modified

Legend:

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

    r4656 r4706  
    159159        } 
    160160 
    161         $q = $this->returnQueryWithRootId($q, $rootId)->setHydrationMode($hydrationMode); 
     161        $q = $this->returnQueryWithRootId($q, $rootId); 
     162         
     163        // FIX: Reported in ticket #1268 
     164        if ($hydrationMode !== null) { 
     165            $q = $q->setHydrationMode($hydrationMode); 
     166        } 
     167 
    162168        $tree = $q->execute(); 
    163169 
     
    191197        $q->addWhere($this->_baseAlias . ".lft >= ? AND " . $this->_baseAlias . ".rgt <= ?", $params) 
    192198                ->addOrderBy($this->_baseAlias . ".lft asc"); 
    193         $q = $this->returnQueryWithRootId($q, $record->getNode()->getRootValue()) 
    194             ->setHydrationMode($hydrationMode); 
     199        $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 
    195206        return $q->execute(); 
    196207    }