From 35993eab38db2aa67137d674baa31031266c2b2e Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Fri, 4 Jul 2014 14:41:55 +0200 Subject: fix: overwrite single config instead of deleting old one --- .../java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'id/server/moa-id-commons/src/main/java/at') diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java index 88220cded..e890e2145 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java @@ -147,8 +147,8 @@ public class ConfigurationDBRead { Logger.trace("Found entries: " + result.size()); if (result.size() == 0) { - Logger.trace("No entries found."); - return null; + Logger.trace("No entries found. Create fresh instance."); + return new MOAIDConfiguration(); } return (MOAIDConfiguration) result.get(0); -- cgit v1.2.3 From 27c5460e2138fbb7de64214a7538b98effb5a7a6 Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Fri, 4 Jul 2014 14:44:26 +0200 Subject: fix: CPEPS list is now edited in place instead of clean and refill --- .../java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'id/server/moa-id-commons/src/main/java/at') diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBUtils.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBUtils.java index 6bd987f96..cdb19340d 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBUtils.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBUtils.java @@ -154,7 +154,7 @@ public final class ConfigurationDBUtils { synchronized (session) { tx.begin(); - session.persist(dbo); + session.merge(dbo); tx.commit(); //session.clear(); -- cgit v1.2.3