From aab6d2df0e1241b31fd10281868009a8508f341a Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 12 Mar 2016 13:58:01 +0100 Subject: [PATCH] changed order of cascade, option attributes (all code more consistent) --- .../mxchange/addressbook/model/addressbook/UserAddressbook.java | 2 +- .../model/addressbook/entry/UserAddressbookEntry.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.5