Bug #52591
The Pagination Widget broken for joined objects
Status: | New | Start date: | 2013-10-07 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | - | % Done: | 0% |
|
Category: | - | |||
Target version: | - | |||
Has patch: | No | Affected Flow version: | Git master |
Description
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).
History
#1 Updated by Philipp Maier almost 2 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();