From: Roland Haeder Date: Sat, 12 Mar 2016 12:58:01 +0000 (+0100) Subject: changed order of cascade, option attributes (all code more consistent) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=aab6d2df0e1241b31fd10281868009a8508f341a;p=addressbook-lib.git changed order of cascade, option attributes (all code more consistent) --- diff --git a/src/org/mxchange/addressbook/model/addressbook/UserAddressbook.java b/src/org/mxchange/addressbook/model/addressbook/UserAddressbook.java index 948695f..5f886a6 100644 --- a/src/org/mxchange/addressbook/model/addressbook/UserAddressbook.java +++ b/src/org/mxchange/addressbook/model/addressbook/UserAddressbook.java @@ -109,7 +109,7 @@ public class UserAddressbook implements Addressbook { * Connection to "users" table */ @JoinColumn (name = "addressbook_user_id", nullable = false) - @OneToOne (targetEntity = LoginUser.class, optional = false, cascade = CascadeType.REFRESH) + @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.REFRESH, optional = false) private User addressbookUser; /** diff --git a/src/org/mxchange/addressbook/model/addressbook/entry/UserAddressbookEntry.java b/src/org/mxchange/addressbook/model/addressbook/entry/UserAddressbookEntry.java index a90c3b9..8af65ce 100644 --- a/src/org/mxchange/addressbook/model/addressbook/entry/UserAddressbookEntry.java +++ b/src/org/mxchange/addressbook/model/addressbook/entry/UserAddressbookEntry.java @@ -92,7 +92,7 @@ public class UserAddressbookEntry implements AddressbookEntry { * Connection to table "addressbooks" */ @JoinColumn (name = "entry_addressbook_id", nullable = false, updatable = false) - @OneToOne (targetEntity = UserAddressbook.class, optional = false, cascade = CascadeType.REFRESH) + @OneToOne (targetEntity = UserAddressbook.class, cascade = CascadeType.REFRESH, optional = false) private Addressbook addressbookId; @Override