From bc031289c0789c68dfe82b74f8ec231b7d96f2b3 Mon Sep 17 00:00:00 2001 From: zYne Date: Fri, 10 Aug 2007 20:35:25 +0000 Subject: [PATCH] fixes #425 --- lib/Doctrine/Connection/UnitOfWork.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/Doctrine/Connection/UnitOfWork.php b/lib/Doctrine/Connection/UnitOfWork.php index 4fb4e8e2f..b0547b6d0 100644 --- a/lib/Doctrine/Connection/UnitOfWork.php +++ b/lib/Doctrine/Connection/UnitOfWork.php @@ -347,8 +347,6 @@ class Doctrine_Connection_UnitOfWork extends Doctrine_Connection_Module } foreach ($v->getInsertDiff() as $r) { - - $assocRecord = $assocTable->create(); $assocRecord->set($rel->getForeign(), $r); $assocRecord->set($rel->getLocal(), $record); @@ -426,7 +424,7 @@ class Doctrine_Connection_UnitOfWork extends Doctrine_Connection_Module $record->preUpdate($event); $record->getTable()->getRecordListener()->preUpdate($event); - + if ( ! $event->skipOperation) { $array = $record->getPrepared(); @@ -466,7 +464,7 @@ class Doctrine_Connection_UnitOfWork extends Doctrine_Connection_Module . ' WHERE ' . implode(' = ? AND ', $record->getTable()->getPrimaryKeys()) . ' = ?'; - $stmt = $this->conn->getDbh()->prepare($sql); + $stmt = $this->conn->prepare($sql); $stmt->execute($params); $record->assignIdentifier(true);