diff --git a/lib/Cake/Model/Datasource/Database/Query.php b/lib/Cake/Model/Datasource/Database/Query.php index 304d29726d1..1519ffc4503 100644 --- a/lib/Cake/Model/Datasource/Database/Query.php +++ b/lib/Cake/Model/Datasource/Database/Query.php @@ -493,7 +493,7 @@ protected function _bindParams($statement) { * @return void **/ protected function _transformQuery() { - if (isset($this->_transformedQuery)) { + if (isset($this->_transformedQuery) && !$this->_dirty) { return $this->_transformedQuery; } // TODO: Should Query actually get the driver or just let the connection decide where