From: Roland Häder Date: Mon, 22 Aug 2016 15:42:54 +0000 (+0200) Subject: Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e6985add17069fa6ba3ff485dd89f36a6a494d78;p=jjobs-ejb.git Please cherry-pick: - when updating contact data, detach all other referenced instances, else new entries are being created each update-time --- diff --git a/src/java/org/mxchange/jcontacts/contact/JobsContactSessionBean.java b/src/java/org/mxchange/jcontacts/contact/JobsContactSessionBean.java index 5d6cb59..f1f811e 100644 --- a/src/java/org/mxchange/jcontacts/contact/JobsContactSessionBean.java +++ b/src/java/org/mxchange/jcontacts/contact/JobsContactSessionBean.java @@ -17,6 +17,7 @@ package org.mxchange.jcontacts.contact; import java.text.MessageFormat; +import java.util.GregorianCalendar; import java.util.Iterator; import java.util.List; import java.util.Objects; @@ -281,7 +282,10 @@ public class JobsContactSessionBean extends BaseJobsDatabaseBean implements Cont } // Set updated timestamp - this.setAllContactPhoneEntriesUpdated(contact, isCellphoneUnlinked, isLandlineUnlinked, isFaxUnlinked); + contact.setContactUpdated(new GregorianCalendar()); + + // Detach all phone numbers + this.detachAllContactPhoneEntries(contact); // Merge cellphone, land-line and fix Contact detachedContact = this.mergeContactData(contact);