From ee063039096ca3a04e323158e70440e0d8a06472 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 23 Aug 2016 15:03:00 +0200 Subject: [PATCH] Please cherry-pick: - 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) --- .../phonenumbers/phone/PizzaAdminPhoneSessionBean.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/java/org/mxchange/jphone/phonenumbers/phone/PizzaAdminPhoneSessionBean.java b/src/java/org/mxchange/jphone/phonenumbers/phone/PizzaAdminPhoneSessionBean.java index 154c881..82f6ba6 100644 --- a/src/java/org/mxchange/jphone/phonenumbers/phone/PizzaAdminPhoneSessionBean.java +++ b/src/java/org/mxchange/jphone/phonenumbers/phone/PizzaAdminPhoneSessionBean.java @@ -223,6 +223,7 @@ public class PizzaAdminPhoneSessionBean extends BasePizzaDatabaseBean implements 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 PizzaAdminPhoneSessionBean extends BasePizzaDatabaseBean implements 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 PizzaAdminPhoneSessionBean extends BasePizzaDatabaseBean implements 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 -- 2.39.5