From: Roland Häder Date: Sun, 29 Apr 2018 03:11:51 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ed5d7fc9859cc7bc60dd60f8e20779671cce9785;p=jcontacts-business-core.git Continued: - need to eagerly fetch this list Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jcontactsbusiness/model/branchoffice/BusinessBranchOffice.java b/src/org/mxchange/jcontactsbusiness/model/branchoffice/BusinessBranchOffice.java index d7c4ae6..180d2a3 100644 --- a/src/org/mxchange/jcontactsbusiness/model/branchoffice/BusinessBranchOffice.java +++ b/src/org/mxchange/jcontactsbusiness/model/branchoffice/BusinessBranchOffice.java @@ -24,6 +24,7 @@ import javax.persistence.Basic; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; +import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; @@ -172,7 +173,7 @@ public class BusinessBranchOffice implements BranchOffice { @JoinTable (name = "branch_opening_times", joinColumns = @JoinColumn (name = "branch_opening_id", referencedColumnName = "branch_id"), inverseJoinColumns = @JoinColumn (name = "opening_branch_id", referencedColumnName = "opening_times_id")) - @ManyToMany (targetEntity = BusinessOpeningTime.class, cascade = CascadeType.ALL) + @ManyToMany (targetEntity = BusinessOpeningTime.class, cascade = CascadeType.ALL, fetch = FetchType.EAGER) private List branchOpeningTimes; /**