From: Roland Haeder Date: Fri, 11 Mar 2016 21:02:02 +0000 (+0100) Subject: Some cascade/fetch cleanups: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2e736be5fa0c29a4c4dd6fb5ac8ece91d2055494;p=jaddressbook-share-lib.git Some cascade/fetch cleanups: - CascadeType.MERGE is basicly an UPDATE statement, it needs to be REFRESH (from database to local entity object) - Fetch strategy EAGER is default, no need to specify it - updated jar(s) --- diff --git a/lib/juser-core.jar b/lib/juser-core.jar index 22b1352..7dad4a0 100644 Binary files a/lib/juser-core.jar and b/lib/juser-core.jar differ diff --git a/lib/juser-lib.jar b/lib/juser-lib.jar index 985516f..f637271 100644 Binary files a/lib/juser-lib.jar and b/lib/juser-lib.jar differ diff --git a/src/org/mxchange/addressbook/events/sharing/type/SharingType.java b/src/org/mxchange/addressbook/events/sharing/type/SharingType.java index 8ac9c11..c924ae4 100644 --- a/src/org/mxchange/addressbook/events/sharing/type/SharingType.java +++ b/src/org/mxchange/addressbook/events/sharing/type/SharingType.java @@ -17,7 +17,7 @@ package org.mxchange.addressbook.events.sharing.type; /** - * An enum for sharing types + * An enumeration for sharing types *

* @author Roland Haeder */ diff --git a/src/org/mxchange/addressbook/model/addressbook/UserAddressbook.java b/src/org/mxchange/addressbook/model/addressbook/UserAddressbook.java index b6e87dc..7ff7cba 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, Comparable { * Connection to "users" table */ @JoinColumn (name = "addressbook_user_id", nullable = false) - @OneToOne (targetEntity = LoginUser.class, optional = false, cascade = CascadeType.MERGE) + @OneToOne (targetEntity = LoginUser.class, optional = false, cascade = CascadeType.REFRESH) 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 c65aead..d5ad054 100644 --- a/src/org/mxchange/addressbook/model/addressbook/entry/UserAddressbookEntry.java +++ b/src/org/mxchange/addressbook/model/addressbook/entry/UserAddressbookEntry.java @@ -62,7 +62,7 @@ public class UserAddressbookEntry implements AddressbookEntry, Comparable * @author Roland Haeder */