From 139febaed61c88bb217131688814d30366fc98b7 Mon Sep 17 00:00:00 2001 From: guilhermeblanco Date: Wed, 27 Feb 2008 02:17:42 +0000 Subject: [PATCH] Adjusted quoteIdentifier in update and delete when executing a SQL query (also fixes #807) --- lib/Doctrine/Connection.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/Connection.php b/lib/Doctrine/Connection.php index f22c42e6e..2b3ba2e5e 100644 --- a/lib/Doctrine/Connection.php +++ b/lib/Doctrine/Connection.php @@ -584,7 +584,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { $criteria = array(); foreach (array_keys($identifier) as $id) { - $criteria[] = $id . ' = ?'; + $criteria[] = $this->quoteIdentifier($id) . ' = ?'; } $query = 'DELETE FROM ' @@ -612,10 +612,10 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun $set = array(); foreach ($data as $columnName => $value) { if ($value instanceof Doctrine_Expression) { - $set[] = $columnName . ' = ' . $value->getSql(); + $set[] = $this->quoteIdentifier($columnName) . ' = ' . $value->getSql(); unset($data[$columnName]); } else { - $set[] = $columnName . ' = ?'; + $set[] = $this->quoteIdentifier($columnName) . ' = ?'; } }