#81822Allow to clone QueryBuilder
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