]> git.mxchange.org Git - pizzaservice-mailer-ejb.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Mon, 22 Aug 2016 15:42:54 +0000 (17:42 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 9 Jun 2017 20:03:04 +0000 (22:03 +0200)
- when updating contact data, detach all other referenced instances, else new entries are being created each update-time

src/java/org/mxchange/jcontacts/contact/AddressbookContactSessionBean.java

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