From c3081adb0999aaafede00875fb82ff641aca5975 Mon Sep 17 00:00:00 2001 From: romanb Date: Wed, 26 Aug 2009 09:10:14 +0000 Subject: [PATCH] [2.0] Moved beginTransaction() in UnitOfWork#commit() out of the try block so that exceptions occuring during prior or on transaction start are not masked by another exception. --- lib/Doctrine/ORM/UnitOfWork.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/ORM/UnitOfWork.php b/lib/Doctrine/ORM/UnitOfWork.php index 94549cc9c..50eb56ecb 100644 --- a/lib/Doctrine/ORM/UnitOfWork.php +++ b/lib/Doctrine/ORM/UnitOfWork.php @@ -265,9 +265,9 @@ class UnitOfWork implements PropertyChangedListener } $conn = $this->_em->getConnection(); - try { - $conn->beginTransaction(); - + + $conn->beginTransaction(); + try { if ($this->_entityInsertions) { foreach ($commitOrder as $class) { $this->_executeInserts($class);