Actions
Bug #81822
closedAllow to clone QueryBuilder
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2017-07-08
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
The Doctrine query builder supports cloning, so should our Query Builder, which is just a wrapper around it.
$newQueryBuilder = clone $queryBuilder;
Cloning of the query builder is useful when e.g. implementing pagination where process looks usually like:
- User provides query builder without limit and page
- pagination takes the query builder, clones it, changes the select part to "count(*)" to get the count of the results
- pagination takes the original query builder adds a limit and offset, and executes the query
Actions