Bug #81822

Allow to clone QueryBuilder

Added by Tymoteusz Motylewski over 2 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2017-07-08
Due date:
% Done:

100%

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

Associated revisions

Revision 8960d9a5 (diff)
Added by Tymoteusz Motylewski over 2 years ago

[BUGFIX] Allow cloning of the QueryBuilder

In order to be able to implement pagination
it has to be possible to clone QueryBuilder.

Doctrine query builder already supports cloning,
so it's just about allowing it in our wrapper.

Resolves: #81822
Releases: master, 8.7
Change-Id: I059bdc51d1181cac08a3d9f30de174b025c6e89d
Reviewed-on: https://review.typo3.org/53424
Tested-by: TYPO3com <>
Reviewed-by: Wolfgang Klinger <>
Tested-by: Wolfgang Klinger <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

Revision ec4d05eb (diff)
Added by Tymoteusz Motylewski over 2 years ago

[BUGFIX] Allow cloning of the QueryBuilder

In order to be able to implement pagination
it has to be possible to clone QueryBuilder.

Doctrine query builder already supports cloning,
so it's just about allowing it in our wrapper.

Resolves: #81822
Releases: master, 8.7
Change-Id: I059bdc51d1181cac08a3d9f30de174b025c6e89d
Reviewed-on: https://review.typo3.org/53524
Tested-by: TYPO3com <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

History

#1 Updated by Gerrit Code Review over 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53424

#2 Updated by Gerrit Code Review over 2 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53424

#3 Updated by Gerrit Code Review over 2 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53424

#4 Updated by Gerrit Code Review over 2 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53524

#5 Updated by Tymoteusz Motylewski over 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#6 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF