#97348Typo3DbQueryParser::convertQueryToDoctrineQueryBuilder ignores Limit and Offset
Description
When converting a QueryInterface to DoctrineQueryBuilder like this:
$query = $this->createQuery();
...
$query->setLimit(10);
$query->setOffset(20);
$queryParser = GeneralUtility::makeInstance(Typo3DbQueryParser::class);
$queryBuilder = $queryParser->convertQueryToDoctrineQueryBuilder($query);
The Limit and Offset are ignored while converting.
This affects all versions of Typo3, as far as I know.
Reviews 1
History 38
-
Gerrit Code Review pushed patch set 1 for main to change 74260 status
NewUnder Review 04/08/22, 20:07 -
Gerrit Code Review pushed patch set 2 for main to change 74260 04/08/22, 20:55
-
Gerrit Code Review pushed patch set 3 for main to change 74260 04/09/22, 19:25
-
Gerrit Code Review pushed patch set 4 for main to change 74260 04/11/22, 20:33
-
Harald Holzmann commented 04/29/22, 10:57
-
Gerrit Code Review pushed patch set 5 for main to change 74260 05/03/23, 09:45
-
Benni Mack changed status
Under ReviewNew 07/07/23, 14:32 -
Stefan Froemken commented and changed status
NewClosed 07/10/23, 16:41Hello Christian,
thank you for providing this issue. I love this idea in general, but this class is marked for internal use only. The extbase system uses this method from two different locations: collecting the data (method: getObjectDataByQuery) and counting the data (method: getObjectCountByQuery). Please have a look at both of the methods. The setting part of limit and offset differs a lot. That’s why we can’t integrate this part into convertQueryToDoctrineQueryBuilder directly. Please adapt that part on your own.
I will close the ticket now. If you feel this is the wrong decision, let me know, and I will re-open it.
Stefan
Can also confirm this.
is missing