Issue Bug Closed

#81887make extbase pagination work with QueryBuilder

Tymoteusz Motylewski 07/15/17, 22:43 updated 10/02/18, 10:58

Description

Since 8.7 you can pass a QueryBuilder object as a parameter to the statement() method of the Extbase Query.

So inside repository method you can do sth like:

$queryBuilder->select('*')->...

$query = $this->createQuery();
$query->statement($queryBuilder);

return $query->execute();

The only missing thing is pagination support for queries built this way.

To achieve that we need 2 changes:
1)
in Typo3DbQueryParser::convertQueryToDoctrineQueryBuilder
we need to early return, as the QueryBuilder object is already available, so there is no need for a conversion.

2) in Typo3DbBackend::getObjectDataByQuery
set limit and offset to the query

Reviews 2