[TYPO3-mvc] QueryResult object has issues with offsets and "count" method ?
Bastian Waidelich
bastian.waidelich at typo3.org
Fri Nov 19 12:03:41 CET 2010
Franz Koch wrote:
>> Can you please debug $statement at the end of
>> Tx_Extbase_Persistence_Storage_Typo3DbBackend::getObjectCountByQuery()?
>
> hehe, I already did in the meantime. The query itself looks ok, except
> for the fact that the LIMIT statement is not filtered out, and this
> somehow leads to a FALSE return value in the Typo3DBBackend instead of
> returning the count of the limited subset.
True, I stumbled upon this too and fixed it in my working copy
(ordering- and group constraints can be filtered out too).
But are you sure, that omitting the limit constraint fixes this for you?
As long as there is no grouping, COUNT(*) always returns one row anyways..
Can you try if it works if you add
if (isset($statementParts['orderings'])) {
unset($statementParts['orderings']);
}
above the line
$statement = $this->buildQuery($statementParts, $parameters);
?
Thanks
Bastian
More information about the TYPO3-project-typo3v4mvc
mailing list