[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.
This commit is contained in:
parent
8523648a27
commit
c3081adb09
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue