import java.util.Objects;
import javax.persistence.Basic;
+import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
* Connection to table "cellphone_provider" (for dial prefix and more data)
*/
@JoinColumn (name = "cellphone_provider_id", nullable = false)
- @OneToOne (targetEntity = CellphoneProvider.class, optional = false, fetch = FetchType.EAGER)
+ @OneToOne (targetEntity = CellphoneProvider.class, cascade = CascadeType.ALL, optional = false, fetch = FetchType.EAGER)
private SmsProvider cellphoneProvider;
/**
import java.util.Objects;
import javax.persistence.Basic;
+import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
* Country instance ('s dial data)
*/
@JoinColumn (name = "fax_country_id", nullable = false)
- @OneToOne (targetEntity = CountryData.class, optional = false, fetch = FetchType.EAGER)
+ @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.MERGE, optional = false, fetch = FetchType.EAGER)
private Country faxCountry;
/**
import java.util.Objects;
import javax.persistence.Basic;
+import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
* Connection to table "country_data"
*/
@JoinColumn (name = "phone_country_id", nullable = false, updatable = false)
- @OneToOne (targetEntity = CountryData.class, optional = false, fetch = FetchType.EAGER)
+ @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.ALL, optional = false, fetch = FetchType.EAGER)
private Country phoneCountry;
/**
import java.util.Objects;
import javax.persistence.Basic;
+import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
* Country instance ('s dial data)
*/
@JoinColumn (name = "provider_country_id", nullable = false)
- @OneToOne (targetEntity = CountryData.class, optional = false, fetch = FetchType.EAGER)
+ @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.ALL, optional = false, fetch = FetchType.EAGER)
private Country providerCountry;
@Override