fixed bug in Doctrine_Query::copy() - params were not copied
This commit is contained in:
parent
e9ba4504bf
commit
26ee84d5c8
@ -1448,7 +1448,6 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable
|
|||||||
. $table->getColumnName($table->getIdentifier())
|
. $table->getColumnName($table->getIdentifier())
|
||||||
. ' = '
|
. ' = '
|
||||||
. $assocAlias . '.' . $relation->getForeign();
|
. $assocAlias . '.' . $relation->getForeign();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->parts['from'][] = $queryPart;
|
$this->parts['from'][] = $queryPart;
|
||||||
@ -1641,6 +1640,13 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable
|
|||||||
return $this->execute($params, $hydrationMode);
|
return $this->execute($params, $hydrationMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copies a Doctrine_Query object.
|
||||||
|
*
|
||||||
|
* @param Doctrine_Query Doctrine query instance.
|
||||||
|
* If ommited the instance itself will be used as source.
|
||||||
|
* @return Doctrine_Query Copy of the Doctrine_Query instance.
|
||||||
|
*/
|
||||||
public function copy(Doctrine_Query $query = null)
|
public function copy(Doctrine_Query $query = null)
|
||||||
{
|
{
|
||||||
if ( ! $query) {
|
if ( ! $query) {
|
||||||
@ -1649,6 +1655,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable
|
|||||||
|
|
||||||
$new = new Doctrine_Query();
|
$new = new Doctrine_Query();
|
||||||
$new->_dqlParts = $query->_dqlParts;
|
$new->_dqlParts = $query->_dqlParts;
|
||||||
|
$new->_params = $query->_params;
|
||||||
$new->_hydrationMode = $query->_hydrationMode;
|
$new->_hydrationMode = $query->_hydrationMode;
|
||||||
|
|
||||||
return $new;
|
return $new;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user