]> git.mxchange.org Git - jfinancials-mailer-ejb.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Tue, 23 Aug 2016 13:03:00 +0000 (15:03 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 9 Jun 2017 20:09:22 +0000 (22:09 +0200)
- copy all data from detached to managed instance before updating it
- this needs to be done before the updated timestamp is being set to make sure it is not overwritten by old value (as copyAll() may do it)

src/java/org/mxchange/jphone/phonenumbers/phone/AddressbookAdminPhoneSessionBean.java

index 413ddcd6b0d13492e8b4690e23a39ba0069150de..54d72f598d9f13bdef724135ed7f7b439c7dd7aa 100644 (file)
@@ -223,6 +223,7 @@ public class AddressbookAdminPhoneSessionBean extends BaseAddressbookDatabaseBea
                this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.updateFaxData: managedNumber.phoneId={1}", this.getClass().getSimpleName(), managedNumber.getPhoneId())); //NOI18N
 
                // Set updated timestamp
+               managedNumber.copyAll(faxNumber);
                managedNumber.setPhoneEntryUpdated(new GregorianCalendar());
 
                // Trace message
@@ -280,7 +281,8 @@ public class AddressbookAdminPhoneSessionBean extends BaseAddressbookDatabaseBea
                this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.updateLandLineData: managedNumber.phoneId={1}", this.getClass().getSimpleName(), managedNumber.getPhoneId())); //NOI18N
 
                // Set updated timestamp
-               landLineNumber.setPhoneEntryUpdated(new GregorianCalendar());
+               managedNumber.copyAll(landLineNumber);
+               managedNumber.setPhoneEntryUpdated(new GregorianCalendar());
 
                // Trace message
                this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateLandLineData: managedNumber={1} - EXIT!", this.getClass().getSimpleName(), managedNumber)); //NOI18N
@@ -331,7 +333,8 @@ public class AddressbookAdminPhoneSessionBean extends BaseAddressbookDatabaseBea
                this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.updateMobileData: managedNumber.phoneId={1}", this.getClass().getSimpleName(), managedNumber.getPhoneId())); //NOI18N
 
                // Set updated timestamp
-               mobileNumber.setPhoneEntryUpdated(new GregorianCalendar());
+               managedNumber.copyAll(mobileNumber);
+               managedNumber.setPhoneEntryUpdated(new GregorianCalendar());
 
                // Trace message
                this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateMobileData: managedNumber={1} - EXIT!", this.getClass().getSimpleName(), managedNumber)); //NOI18N