From 7e4e5924a4ad6039111700764c61a4bf94f1dc9b Mon Sep 17 00:00:00 2001 From: zYne Date: Sun, 29 Oct 2006 21:57:47 +0000 Subject: [PATCH] Fixes #209 --- lib/Doctrine/Connection/Transaction.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/Connection/Transaction.php b/lib/Doctrine/Connection/Transaction.php index d99852e79..1cff8db92 100644 --- a/lib/Doctrine/Connection/Transaction.php +++ b/lib/Doctrine/Connection/Transaction.php @@ -145,7 +145,7 @@ class Doctrine_Connection_Transaction implements Countable, IteratorAggregate { $this->conn->getDBH()->beginTransaction(); - $this->getAttribute(Doctrine::ATTR_LISTENER)->onTransactionBegin($this->conn); + $this->conn->getAttribute(Doctrine::ATTR_LISTENER)->onTransactionBegin($this->conn); } try { @@ -214,8 +214,14 @@ class Doctrine_Connection_Transaction implements Countable, IteratorAggregate { } if($record instanceof Doctrine_Record) { $params = substr(str_repeat("?, ",count($ids)),0,-2); - $query = "DELETE FROM ".$record->getTable()->getTableName()." WHERE ".$record->getTable()->getIdentifier()." IN(".$params.")"; - $this->conn->execute($query,$ids); + + $query = 'DELETE FROM ' + . $record->getTable()->getTableName() + . ' WHERE ' + . $record->getTable()->getIdentifier() + . ' IN(' . $params . ')'; + + $this->conn->execute($query, $ids); } }