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=7c15e156f3afd2bdd32eb48ffee391c896150efa;p=pizzaservice-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/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());