Project

General

Profile

Actions

Bug #31127

closed

DBAL does not respect sql_query.passthrough settings

Added by Wojtek Gancarczyk about 13 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2011-10-20
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
PHP Version:
Tags:
DBAL, MySQL,sql_query.passthrough
Complexity:
Is Regression:
Sprint Focus:

Description

I have tried to execute following query in Extbase

$query = $this->createQuery();
$mediaTypeConstraint = $query->equals('mediatype', $media);
$query->matching($mediaTypeConstraint);
$query->setOrderings(array('mediadate' => Tx_Extbase_Persistence_QueryInterface::ORDER_DESCENDING));
$query->setLimit($count);
$results = $query->execute();

but my results are not limited to my $count. I have checked and Extbase produces a correct and valid query. After some debugging I have found the problem in DBAL's ux_t3lib_db class. The problematic method is sql_query. To be honest I didn't dig any further, I just noticed that you can set an option sql_query.passthrough to send your query directly to the parents sql_query method. Unfortunately this setting is not respected by DBAL becaus $globalConfig['sql_query.passthrough'] returns always NULL. The correct condition should be $globalConfig['sql_query.']['passthrough'].

Actions #1

Updated by Xavier Perseguers about 13 years ago

  • Status changed from New to Accepted
Actions #2

Updated by Mr. Hudson about 13 years ago

Patch set 1 of change Ia3c4fc16c27e51e67340fb52dc98240f68ab69ee has been pushed to the review server.
It is available at http://review.typo3.org/6143

Actions #3

Updated by Mr. Hudson about 13 years ago

Patch set 1 of change Icf78bc455d45ac1b6c2dc12345a404c2cc07278b has been pushed to the review server.
It is available at http://review.typo3.org/6145

Actions #4

Updated by Xavier Perseguers about 13 years ago

  • Status changed from Accepted to Under Review
Actions #5

Updated by Xavier Perseguers about 13 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Michael Stucki almost 11 years ago

  • Project changed from 329 to TYPO3 Core
  • Category deleted (MySQL)
Actions #7

Updated by Michael Stucki almost 11 years ago

  • Category set to 999
Actions #8

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF