Commit 88f8c875 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Mauvaise idée de déclencher une transaction dans le bindRquestSave.

A faire au besoin uniquement
parent b33c26ad
Loading
Loading
Loading
Loading
+0 −3
Changes for module/Application/src/Form/AbstractForm.php: 0 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -67,7 +67,6 @@ abstract class AbstractForm extends Form implements InputFilterProviderInterfac

            $this->setData($data);
            if ($this->isValid()) {
                $this->getEntityManager()->beginTransaction();
                try {
                    if ($saveFnc instanceof AbstractEntityService) {
                        $saveFnc->save($entity);
@@ -75,9 +74,7 @@ abstract class AbstractForm extends Form implements InputFilterProviderInterfac
                    } elseif ($saveFnc instanceof \Closure) {
                        $saveFnc($entity);
                    }
                    $this->getEntityManager()->commit();
                } catch (\Exception $e) {
                    $this->getEntityManager()->rollback();
                    $this->getControllerPluginFlashMessenger()->addErrorMessage($this->translate($e->getMessage()));

                    return false;