]> git.mxchange.org Git - jphone-core.git/commitdiff
added missing cascade type, at least MERGE
authorRoland Haeder <roland@mxchange.org>
Fri, 16 Oct 2015 11:14:06 +0000 (13:14 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 16 Oct 2015 11:14:06 +0000 (13:14 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

src/org/mxchange/jphone/phonenumbers/cellphone/CellphoneNumber.java
src/org/mxchange/jphone/phonenumbers/fax/FaxNumber.java
src/org/mxchange/jphone/phonenumbers/landline/LandLineNumber.java
src/org/mxchange/jphone/phonenumbers/smsprovider/CellphoneProvider.java

index 0e536ecda4b27278ac0eaa98005cb3d060797db0..c3e10b5072b1d0668a2095337aef099f210aee4b 100644 (file)
@@ -18,6 +18,7 @@ package org.mxchange.jphone.phonenumbers.cellphone;
 
 import java.util.Objects;
 import javax.persistence.Basic;
+import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.FetchType;
@@ -57,7 +58,7 @@ public class CellphoneNumber implements DialableCellphoneNumber, Comparable<Dial
         * 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;
 
        /**
index 5e55e591d9e945036620645bf473c2bd959c3a07..81d873fd41e738cf276e4e237f580beb6865f3e8 100644 (file)
@@ -18,6 +18,7 @@ package org.mxchange.jphone.phonenumbers.fax;
 
 import java.util.Objects;
 import javax.persistence.Basic;
+import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.FetchType;
@@ -70,7 +71,7 @@ public class FaxNumber implements DialableFaxNumber, Comparable<DialableFaxNumbe
         * 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;
 
        /**
index aca8d08033ea900314194315f6a227068e8ba0f4..57af41c37988bef47ff85cb82aa20a5d03191972 100644 (file)
@@ -18,6 +18,7 @@ package org.mxchange.jphone.phonenumbers.landline;
 
 import java.util.Objects;
 import javax.persistence.Basic;
+import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.FetchType;
@@ -70,7 +71,7 @@ public class LandLineNumber implements DialableLandLineNumber, Comparable<Dialab
         * 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;
 
        /**
index 1e3b360f6dcc8bcd4a4417eb97ad6e7c6a6c8ece..7620f200b268177bbd9f043202e2e1b83d2ce2be 100644 (file)
@@ -18,6 +18,7 @@ package org.mxchange.jphone.phonenumbers.smsprovider;
 
 import java.util.Objects;
 import javax.persistence.Basic;
+import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.FetchType;
@@ -75,7 +76,7 @@ public class CellphoneProvider implements SmsProvider, Comparable<SmsProvider> {
         * 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