From: Roland Häder Date: Tue, 10 May 2016 13:42:50 +0000 (+0200) Subject: use found contact, not merge() (SQL update statement) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=590d11675cd6f7448a80e64302826cb0abe54b2c;p=pizzaservice-mailer-ejb.git use found contact, not merge() (SQL update statement) Signed-off-by: Roland Häder --- 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());