Skip to content

Commit

Permalink
DBAL-134 - Doctrine\DBAL\Connection::query() skips query cache
Browse files Browse the repository at this point in the history
  • Loading branch information
beberlei committed Jun 28, 2011
1 parent 2cb2249 commit adcbbb5
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion lib/Doctrine/DBAL/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,20 @@ public function query()
{
$this->connect();

return call_user_func_array(array($this->_conn, 'query'), func_get_args());
$args = func_get_args();

$logger = $this->getConfiguration()->getSQLLogger();
if ($logger) {
$logger->startQuery($args[0]);
}

$statement = call_user_func_array(array($this->_conn, 'query'), $args);

if ($logger) {
$logger->stopQuery();
}

return $statement;
}

/**
Expand Down

0 comments on commit adcbbb5

Please sign in to comment.