[BUGFIX] Make Extbase pagination work with QueryBuilder queries 09/53409/12
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 11:46:56 +0000 (13:46 +0200)
commita9f7ec32863f9749dee3c16ca6654f0e24bb7f57
treef28083506462709dbb4304981e076e4ac9296fdb
parentd34522e54bde9ffe84ffeb97dc9509efb318e594
[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/53409
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Joerg Kummer <typo3@enobe.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
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