Bug #41146

Query with setOffset returns count() = 0

Added by Carsten Bleicker over 8 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Must have
Category:
Persistence
Start date:
2012-09-21
Due date:
% Done:

100%

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

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

Has duplicate TYPO3.Flow - Bug #42955: QueryResult::count() returns 0 for queries with offsetResolvedBastian Waidelich2012-11-14

Actions
#1

Updated by Karsten Dambekalns over 8 years ago

  • Category set to Persistence
  • Status changed from New to Resolved
  • Assignee set to Bastian Waidelich
  • Target version set to 2.0 beta 1
  • % Done changed from 0 to 100

Also available in: Atom PDF