From a600981b6f34d59d1a15b025f2b48f767c9d9cac Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 22 Aug 2016 17:42:54 +0200 Subject: [PATCH] Please cherry-pick: - when updating contact data, detach all other referenced instances, else new entries are being created each update-time --- .../jcontacts/contact/AddressbookContactSessionBean.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); -- 2.39.5