Signed-off-by: Roland Häder <roland@mxchange.org>
// 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);