]> git.mxchange.org Git - jjobs-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>
Thu, 26 May 2016 13:07:11 +0000 (15:07 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jusercore/model/user/JobsUserSessionBean.java

index 81d82cd7381d94451735ced3ac98c341501e69c4..68a8085db4c5ccc11c2d95023e692f343654daf1 100644 (file)
@@ -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);