From f0109f721ceab836e7d7b1caced135351d95e16b Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Fri, 11 Mar 2016 22:03:13 +0100 Subject: [PATCH] Some cascade/fetch cleanups: - CascadeType.MERGE is basicly an UPDATE statement, it needs to be REFRESH (from database to local entity object) - Fetch strategy EAGER is default, no need to specify it - updated jar(s) --- .../mxchange/jphone/phonenumbers/cellphone/CellphoneNumber.java | 2 +- src/org/mxchange/jphone/phonenumbers/fax/FaxNumber.java | 2 +- .../mxchange/jphone/phonenumbers/landline/LandLineNumber.java | 2 +- .../jphone/phonenumbers/smsprovider/CellphoneProvider.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/org/mxchange/jphone/phonenumbers/cellphone/CellphoneNumber.java b/src/org/mxchange/jphone/phonenumbers/cellphone/CellphoneNumber.java index b69c4da..e98fa08 100644 --- a/src/org/mxchange/jphone/phonenumbers/cellphone/CellphoneNumber.java +++ b/src/org/mxchange/jphone/phonenumbers/cellphone/CellphoneNumber.java @@ -52,7 +52,7 @@ public class CellphoneNumber implements DialableCellphoneNumber, Comparable { * Country instance ('s dial data) */ @JoinColumn (name = "provider_country_id", nullable = false) - @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.MERGE, optional = false) + @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.REFRESH, optional = false) private Country providerCountry; /** -- 2.39.5