Project

General

Profile

Actions

Bug #97348

closed

Typo3DbQueryParser::convertQueryToDoctrineQueryBuilder ignores Limit and Offset

Added by Christian Seyfferth about 2 years ago. Updated 10 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2022-04-08
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:

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.

Actions #1

Updated by Gerrit Code Review about 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74260

Actions #2

Updated by Gerrit Code Review about 2 years ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74260

Actions #3

Updated by Gerrit Code Review about 2 years ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74260

Actions #4

Updated by Gerrit Code Review about 2 years ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74260

Actions #5

Updated by Harald Holzmann about 2 years ago

Can also confirm this.

  $concreteQb->setMaxResults($limit);
  $concreteQb->setFirstResult($offset);

is missing

Actions #6

Updated by Gerrit Code Review about 1 year ago

Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74260

Actions #7

Updated by Benni Mack 10 months ago

  • Status changed from Under Review to New
Actions #8

Updated by Stefan Froemken 10 months ago

  • Status changed from New to Closed

Hello 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

Actions

Also available in: Atom PDF