Clone directly the ArrayCollection instead of looping
This commit is contained in:
parent
996e47bf61
commit
8c24e528ad
@ -209,9 +209,7 @@ class Paginator implements \Countable, \IteratorAggregate
|
|||||||
/* @var $cloneQuery Query */
|
/* @var $cloneQuery Query */
|
||||||
$cloneQuery = clone $query;
|
$cloneQuery = clone $query;
|
||||||
|
|
||||||
foreach ($query->getParameters() as $parameter) {
|
$cloneQuery->setParameters(clone $query->getParameters());
|
||||||
$cloneQuery->setParameter($parameter->getName(), $parameter->getValue(), $parameter->getType());
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($query->getHints() as $name => $value) {
|
foreach ($query->getHints() as $name => $value) {
|
||||||
$cloneQuery->setHint($name, $value);
|
$cloneQuery->setHint($name, $value);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user