Issue Bug Closed

#31127DBAL does not respect sql_query.passthrough settings

Wojtek Gancarczyk 10/20/11, 09:28 updated 10/02/18, 12:19

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’].

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.