]> git.mxchange.org Git - jjobs-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:31:09 +0000 (21:31 +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/JobsContactSessionBean.java

index 5d6cb599a5dbc2265d1a18e26d6007e4ed39b837..f1f811ed80d136f2256697152028b8077da94ecb 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 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);