[BUGFIX] Make Extbase pagination work with QueryBuilder queries 58/54058/2
authorTymoteusz Motylewski <t.motylewski@gmail.com>
Mon, 14 Aug 2017 14:27:22 +0000 (16:27 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 9 Sep 2017 13:11:48 +0000 (15:11 +0200)
commit3e6f22c18272ef17e1a6fec44766eb595ba433d2
tree36fa89fe4c912e5de24a1c70a1e3b7bc419722ab
parentb87ab2e1608695cd384dbdbe5832876651112938
[BUGFIX] Make Extbase pagination work with QueryBuilder queries

Now you can pass a query built by QueryBuilder to $query->statement(),
and use the QueryResult for pagination.

So inside repository you can create custom query like:

$queryBuilder->select('*')->...
$query = $this->createQuery();
$query->statement($queryBuilder);
return $query->execute();

and pass the result to paginate ViewHelper.

Resolves: #81887
Releases: master, 8.7
Change-Id: Ia00f673039362afaa8ef7232ba4bc89c520d5a46
Reviewed-on: https://review.typo3.org/54058
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php
typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbQueryParser.php
typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Typo3DbQueryParserTest.php