[Lada-commits] [PATCH] The database might refuse to delete an object e.g. due to FK constraints

Wald Commits scm-commit at wald.intevation.org
Wed May 25 16:52:16 CEST 2016


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1464187915 -7200
# Node ID 58fc5b5fad4bd314eb2e36fced0e8b5673780ea7
# Parent  379480a94c8158e0547320f75f90eb1b4a9d093e
The database might refuse to delete an object e.g. due to FK constraints.

diff -r 379480a94c81 -r 58fc5b5fad4b src/main/java/de/intevation/lada/util/data/DefaultRepository.java
--- a/src/main/java/de/intevation/lada/util/data/DefaultRepository.java	Tue May 24 17:15:44 2016 +0200
+++ b/src/main/java/de/intevation/lada/util/data/DefaultRepository.java	Wed May 25 16:51:55 2016 +0200
@@ -128,8 +128,12 @@
         catch (TransactionRequiredException tre) {
             return new Response(false, 603, object);
         }
+        catch (EJBTransactionRolledbackException ete) {
+            return new Response(false, 696, object);
+        }
         return response;
     }
+
     /**
      * Get objects from database using the given filter.
      *


More information about the Lada-commits mailing list