From af41f4ed87ba25255aff7ae4640b5d1d851b9ef8 Mon Sep 17 00:00:00 2001 From: Jose Lorenzo Rodriguez Date: Sun, 27 Jan 2013 16:37:19 +0100 Subject: [PATCH] Only used the cached transformed query if the original one is not dirty --- lib/Cake/Model/Datasource/Database/Query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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