Ticket #1577 (closed defect: fixed)

Opened 9 months ago

Last modified 9 months ago

Getting raw params from a query

Reported by: jphilip Owned by: romanb
Priority: major Milestone: 1.0.4
Component: Query/Hydration Version: 1.0.3
Severity: Keywords:
Cc: Has Test: no
Status: Pending Core Response Has Patch: no

Description

The getParams method (In Astract_Query) returns a flattened param array and the setParams method requires the original _param form:

    public function getParams($params = array())
    {
        return array_merge($params, $this->_params['join'], $this-
>_params['set'], $this->_params['where'], $this->_params['having']);

    }

    public function setParams(array $params = array())
    {
        $this->_params = $params;
    }

In order to manipulate the params in a Dql event and pass them back to the query we would need another method to get the _params array like:

    public function getRawParams()
    {
      return $this->_params;
    }

Change History

Changed 9 months ago by jwage

  • status changed from new to closed
  • resolution set to fixed

(In [5120]) [1.0] fixes #1577

Changed 9 months ago by jwage

(In [5121]) [1.1] fixes #1577 - Added new Doctrine_Query_Abstract::getFlattenedParams() to replace Doctrine_Query_Abstract::getParams() and Doctrine_Query_Abstract::getParams() now returns the raw unmodified array of query parameters.

Note: See TracTickets for help on using tickets.