Bug #41146
Query with setOffset returns count() = 0
| Status: | Resolved | Start date: | 2012-09-21 | |
|---|---|---|---|---|
| Priority: | Must have | Due date: | ||
| Assigned To: | Bastian Waidelich | % Done: | 100% |
|
| Category: | Persistence | |||
| Target version: | TYPO3 Flow Base Distribution - 2.0 beta 1 | |||
| PHP Version: | Complexity: | |||
| Has patch: | No | Affected Flow version: | Git 1.2 (master) |
Description
f.e. in the paginateController: Line# 72:
.....
$query = $this->objects->getQuery();
$query->setLimit($itemsPerPage);
if ($this->currentPage > 1) {
$query->setOffset((integer)($itemsPerPage * ($this->currentPage-1)));
}
$modifiedObjects = $query->execute();
......
Result:
$modifiedObjects->count() will return 0 wich sould be the number of records per page f.e.
This 0 makes the iterator.isLast impossible in the child rendering f:for
Related issues
History
#1 Updated by Karsten Dambekalns over 2 years ago
- Category set to Persistence
- Status changed from New to Resolved
- Assigned To set to Bastian Waidelich
- Target version set to 2.0 beta 1
- % Done changed from 0 to 100