Bug #42955

QueryResult::count() returns 0 for queries with offset

Added by René Pflamm over 8 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Should have
Category:
Persistence
Start date:
2012-11-14
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

NOTE See comments below

On my Project I notice if I have more then itemsPerPage and switched to another Page this one ist Empty.

As example:
On first page, the object to paginate has an count of 27. The paginatedObject hast a count of 27 but display only 10.

With an itemsPerPage limit of 10 I got 3 pages. On Page 2 and 3 I got an paginatedObject of zero and display nothing.

Currently I hotfixed this quick and dirty with an replace of $modifiedObjects = $query->execute(); to $modifiedObjects = $query->getResult(); (see attachment).


Files

PaginateController.patch (827 Bytes) PaginateController.patch René Pflamm, 2012-11-14 11:27
20121114120400b95313.txt (5.91 KB) 20121114120400b95313.txt Exception Log René Pflamm, 2012-11-14 12:08

Related issues

Is duplicate of TYPO3.Flow - Bug #41146: Query with setOffset returns count() = 0ResolvedBastian Waidelich2012-09-21

Actions

Also available in: Atom PDF