From 618110417390969f9ff879fe11106a86a8354d7b 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/JobsUserSessionBean.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/java/org/mxchange/jusercore/model/user/JobsUserSessionBean.java b/src/java/org/mxchange/jusercore/model/user/JobsUserSessionBean.java index 81d82cd..68a8085 100644 --- a/src/java/org/mxchange/jusercore/model/user/JobsUserSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/JobsUserSessionBean.java @@ -561,11 +561,8 @@ public class JobsUserSessionBean extends BaseJobsDatabaseBean implements UserSes // Try to find the contact instance Contact foundContact = this.getEntityManager().find(user.getUserContact().getClass(), user.getUserContact().getContactId()); - // Try to merge it - Contact detachedContact = this.getEntityManager().merge(foundContact); - - // Set it in user - user.setUserContact(detachedContact); + // Set detached object in rexcruiter instance + user.setUserContact(foundContact); // Persist user this.getEntityManager().persist(user); -- 2.39.5