From: Roland Haeder Date: Fri, 11 Mar 2016 21:02:57 +0000 (+0100) Subject: Some cascade/fetch cleanups: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c2cd2dd9093c03def7d8ac7a649feba9534d6cd0;p=jjobs-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/jjobs/events/sharing/type/SharingType.java b/src/org/mxchange/jjobs/events/sharing/type/SharingType.java index 3231505..40d4db3 100644 --- a/src/org/mxchange/jjobs/events/sharing/type/SharingType.java +++ b/src/org/mxchange/jjobs/events/sharing/type/SharingType.java @@ -17,7 +17,7 @@ package org.mxchange.jjobs.events.sharing.type; /** - * An enum for sharing types + * An enumeration for sharing types *

* @author Roland Haeder */ diff --git a/src/org/mxchange/jjobs/model/addressbook/UserAddressbook.java b/src/org/mxchange/jjobs/model/addressbook/UserAddressbook.java index 44c6aaa..274cb9a 100644 --- a/src/org/mxchange/jjobs/model/addressbook/UserAddressbook.java +++ b/src/org/mxchange/jjobs/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/jjobs/model/addressbook/entry/UserAddressbookEntry.java b/src/org/mxchange/jjobs/model/addressbook/entry/UserAddressbookEntry.java index 945eed4..5768462 100644 --- a/src/org/mxchange/jjobs/model/addressbook/entry/UserAddressbookEntry.java +++ b/src/org/mxchange/jjobs/model/addressbook/entry/UserAddressbookEntry.java @@ -32,12 +32,12 @@ import javax.persistence.OneToOne; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; -import org.mxchange.jjobs.model.addressbook.Addressbook; -import org.mxchange.jjobs.model.addressbook.UserAddressbook; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jcontacts.contact.UserContact; import org.mxchange.jcontactsbusiness.BusinessContact; import org.mxchange.jcontactsbusiness.CompanyContact; +import org.mxchange.jjobs.model.addressbook.Addressbook; +import org.mxchange.jjobs.model.addressbook.UserAddressbook; /** * A POJO for address book entries @@ -62,7 +62,7 @@ public class UserAddressbookEntry implements AddressbookEntry, Comparable * @author Roland Haeder */