]> git.mxchange.org Git - pizzaservice-ejb.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Mon, 22 Aug 2016 15:42:54 +0000 (17:42 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 24 Aug 2016 19:22:21 +0000 (21:22 +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/PizzaContactSessionBean.java

index 63d9261d3f0c2203a87445afa0ec5a277583c92d..2e09138e19eb636f9bf7da88ae4ef02a6ab80e9a 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;
@@ -283,7 +284,10 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co
                }
 
                // 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);