]> git.mxchange.org Git - addressbook-ejb.git/commitdiff
use found contact, not merge() (SQL update statement)
authorRoland Häder <roland@mxchange.org>
Tue, 10 May 2016 13:42:50 +0000 (15:42 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 21 May 2016 11:40:22 +0000 (13:40 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jusercore/model/user/AddressbookUserSessionBean.java

index 499d1a31d009e52ab119410b338570ea44ca1423..d801e2d22e46195d07fc6bc14364f68914e1c710 100644 (file)
@@ -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());