Actions
Bug #31127
closedDBAL does not respect sql_query.passthrough settings
Status:
Closed
Priority:
Should have
Assignee:
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