From 590d11675cd6f7448a80e64302826cb0abe54b2c 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 --- .../jusercore/model/user/AddressbookUserSessionBean.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/java/org/mxchange/jusercore/model/user/AddressbookUserSessionBean.java b/src/java/org/mxchange/jusercore/model/user/AddressbookUserSessionBean.java index 499d1a3..d801e2d 100644 --- a/src/java/org/mxchange/jusercore/model/user/AddressbookUserSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/AddressbookUserSessionBean.java @@ -549,11 +549,8 @@ public class AddressbookUserSessionBean extends BaseAddressbookDatabaseBean impl // 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