import java.text.MessageFormat;
import java.util.Objects;
-import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
* 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;
/**