- 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)
* Connection to table "cellphone_provider" (for dial prefix and more data)
*/
@JoinColumn (name = "cellphone_provider_id", nullable = false)
- @OneToOne (targetEntity = CellphoneProvider.class, cascade = CascadeType.MERGE, optional = false)
+ @OneToOne (targetEntity = CellphoneProvider.class, cascade = CascadeType.REFRESH, optional = false)
private SmsProvider cellphoneProvider;
/**
* Country instance ('s dial data)
*/
@JoinColumn (name = "fax_country_id", nullable = false)
- @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.MERGE, optional = false)
+ @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.REFRESH, optional = false)
private Country faxCountry;
/**
* Connection to table "country_data"
*/
@JoinColumn (name = "phone_country_id", nullable = false, updatable = false)
- @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.MERGE, optional = false)
+ @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.REFRESH, optional = false)
private Country phoneCountry;
/**
* 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;
/**