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=a600981b6f34d59d1a15b025f2b48f767c9d9cac;p=pizzaservice-mailer-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/AddressbookContactSessionBean.java b/src/java/org/mxchange/jcontacts/contact/AddressbookContactSessionBean.java index c4ef0b8..e7dc551 100644 --- a/src/java/org/mxchange/jcontacts/contact/AddressbookContactSessionBean.java +++ b/src/java/org/mxchange/jcontacts/contact/AddressbookContactSessionBean.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 AddressbookContactSessionBean extends BaseAddressbookDatabaseBean i } // 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);