[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
@ -265,9 +265,9 @@ class UnitOfWork implements PropertyChangedListener
|
|||||||
}
|
}
|
||||||
|
|
||||||
$conn = $this->_em->getConnection();
|
$conn = $this->_em->getConnection();
|
||||||
try {
|
|
||||||
$conn->beginTransaction();
|
$conn->beginTransaction();
|
||||||
|
try {
|
||||||
if ($this->_entityInsertions) {
|
if ($this->_entityInsertions) {
|
||||||
foreach ($commitOrder as $class) {
|
foreach ($commitOrder as $class) {
|
||||||
$this->_executeInserts($class);
|
$this->_executeInserts($class);
|
||||||
|
Loading…
Reference in New Issue
Block a user