1
0
mirror of synced 2025-01-30 03:51:43 +03:00

Adjusted quoteIdentifier in update and delete when executing a SQL query (also fixes #807)

This commit is contained in:
guilhermeblanco 2008-02-27 02:17:42 +00:00
parent 9ee6158ffc
commit 139febaed6

View File

@ -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) . ' = ?';
}
}