From 7c15e156f3afd2bdd32eb48ffee391c896150efa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 10 May 2016 15:42:50 +0200 Subject: [PATCH] use found contact, not merge() (SQL update statement) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../mxchange/jusercore/model/user/PizzaUserSessionBean.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/java/org/mxchange/jusercore/model/user/PizzaUserSessionBean.java b/src/java/org/mxchange/jusercore/model/user/PizzaUserSessionBean.java index 7c8fd68..a959a84 100644 --- a/src/java/org/mxchange/jusercore/model/user/PizzaUserSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/PizzaUserSessionBean.java @@ -552,11 +552,8 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS // Try to find the contact Contact foundContact = this.getEntityManager().find(user.getUserContact().getClass(), user.getUserContact().getContactId()); - // Merge the contact to get a detached object back - Contact detachedContact = this.getEntityManager().merge(foundContact); - // Set detached object in rexcruiter instance - user.setUserContact(detachedContact); + user.setUserContact(foundContact); // Set timestamp user.setUserCreated(new GregorianCalendar()); -- 2.39.5