1
0
mirror of synced 2025-01-17 22:11:41 +03:00

Clone directly the ArrayCollection instead of looping

This commit is contained in:
Eric GELOEN 2012-07-07 11:33:58 +02:00
parent 996e47bf61
commit 8c24e528ad

View File

@ -209,9 +209,7 @@ class Paginator implements \Countable, \IteratorAggregate
/* @var $cloneQuery Query */
$cloneQuery = clone $query;
foreach ($query->getParameters() as $parameter) {
$cloneQuery->setParameter($parameter->getName(), $parameter->getValue(), $parameter->getType());
}
$cloneQuery->setParameters(clone $query->getParameters());
foreach ($query->getHints() as $name => $value) {
$cloneQuery->setHint($name, $value);