The Pagination Widget broken for joined objects
In cases where objects are reconstructed through joins, setting the LIMIT leads to an incomplete result set.
Doctrine provides an Paginator for these purposes. The widget should use this paginator as soon as it is available in Flow (see: http://forge.typo3.org/issues/52590).
Updated by Philipp Maier almost 8 years ago
In the meantime you can fetch the QueryBuilder from the query object with the ObjectAccess methods (suggested by julle).
Then use the queryBuilder for the Paginator.
$queryBuilder = ObjectAccess::getProperty($query, 'queryBuilder', TRUE); $paginator = new \Doctrine\ORM\Tools\Pagination\Paginator($modifiedObjects); $modifiedObjects = $paginator->getIterator();