Changeset 5074

Show
Ignore:
Timestamp:
10/13/08 17:55:52 (9 months ago)
Author:
jwage
Message:

[1.0, 1.1] fixes #1534 Issue with params and dql callbacks.

Location:
branches
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/1.0/lib/Doctrine/Query/Abstract.php

    r5071 r5074  
    959959        } 
    960960 
    961         $this->_preQuery(); 
     961        $params = $this->getParams($params); 
     962 
     963        $this->_preQuery($params); 
    962964 
    963965        if ($hydrationMode !== null) { 
    964966            $this->_hydrator->setHydrationMode($hydrationMode); 
    965967        } 
    966  
    967         $params = $this->getParams($params); 
    968968 
    969969        if ($this->_resultCache && $this->_type == self::SELECT) { 
     
    10411041     * @return void 
    10421042     */ 
    1043     protected function _preQuery() 
     1043    protected function _preQuery($params = array()) 
    10441044    { 
    10451045        if ( ! $this->_preQueried && $this->getConnection()->getAttribute('use_dql_callbacks')) { 
     
    10541054 
    10551055            $copy = $this->copy(); 
    1056             $copy->getSqlQuery(); 
     1056            $copy->getSqlQuery($params); 
    10571057 
    10581058            foreach ($copy->getQueryComponents() as $alias => $component) { 
  • branches/1.1/lib/Doctrine/Query/Abstract.php

    r5071 r5074  
    10511051        } 
    10521052 
    1053         $this->_preQuery(); 
     1053        $dqlParams = $this->getParams($params); 
     1054 
     1055        $this->_preQuery($dqlParams); 
    10541056 
    10551057        if ($hydrationMode !== null) { 
    10561058            $this->_hydrator->setHydrationMode($hydrationMode); 
    10571059        } 
    1058  
    1059         // Retrieve DQL params 
    1060         $dqlParams = $this->getParams($params); 
    10611060 
    10621061        if ($this->_resultCache && $this->_type == self::SELECT) { 
     
    11431142     * @return void 
    11441143     */ 
    1145     protected function _preQuery() 
     1144    protected function _preQuery($params = array()) 
    11461145    { 
    11471146        if ( ! $this->_preQueried && $this->getConnection()->getAttribute('use_dql_callbacks')) { 
     
    11561155 
    11571156            $copy = $this->copy(); 
    1158             $copy->getSqlQuery(); 
     1157            $copy->getSqlQuery($params); 
    11591158 
    11601159            foreach ($copy->getQueryComponents() as $alias => $component) {