]> git.mxchange.org Git - pizzaservice-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, 14 May 2016 14:07:32 +0000 (16:07 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jusercore/model/user/PizzaUserSessionBean.java

index 7c8fd68a9ce32a4093b56f3fb79aa33278539d8e..a959a840ae4eebeda9c571d1faeadde51a281d02 100644 (file)
@@ -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());