]> git.mxchange.org Git - jbonuscard-lib.git/commitdiff
you need to not cascade here?
authorRoland Haeder <roland@mxchange.org>
Fri, 16 Oct 2015 08:39:25 +0000 (10:39 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 16 Oct 2015 08:39:25 +0000 (10:39 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

src/org/mxchange/addressbook/model/addressbook/shared/AddressbookShare.java

index 6e7e042ac0cf712399d5dba4cf12b60db352665e..5dc3aab3841e99942a06a62a2ddebd98cfaf2b50 100644 (file)
@@ -18,7 +18,6 @@ package org.mxchange.addressbook.model.addressbook.shared;
 
 import java.text.MessageFormat;
 import java.util.Objects;
-import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.GeneratedValue;
@@ -72,21 +71,21 @@ public class AddressbookShare implements ShareableAddressbook, Comparable<Sharea
         * Address book this share is for
         */
        @JoinColumn (name = "share_addressbook_id", nullable = false, updatable = false)
-       @OneToOne (targetEntity = UserAddressbook.class, cascade = CascadeType.ALL, optional = false)
+       @OneToOne (targetEntity = UserAddressbook.class, optional = false)
        private Addressbook shareAddressbook;
 
        /**
         * User who is giving the share (for his/her address book)
         */
        @JoinColumn (name = "share_owner_id", nullable = false, updatable = false)
-       @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.ALL, optional = false)
+       @OneToOne (targetEntity = LoginUser.class, optional = false)
        private User shareUserOwner;
 
        /**
         * User the address book is shared with
         */
        @JoinColumn (name = "share_sharee_id", nullable = false, updatable = false)
-       @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.ALL, optional = false)
+       @OneToOne (targetEntity = LoginUser.class, optional = false)
        private User shareUserSharee;
 
        /**