From: Roland Haeder Date: Fri, 11 Mar 2016 21:03:13 +0000 (+0100) Subject: Some cascade/fetch cleanups: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f0109f721ceab836e7d7b1caced135351d95e16b;p=jphone-core.git 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) --- 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; /**