]> git.mxchange.org Git - jcontacts-business-core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sun, 29 Apr 2018 03:11:51 +0000 (05:11 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 29 Apr 2018 03:11:51 +0000 (05:11 +0200)
- need to eagerly fetch this list

Signed-off-by: Roland Häder <roland@mxchange.org>
src/org/mxchange/jcontactsbusiness/model/branchoffice/BusinessBranchOffice.java

index d7c4ae641316e868c1ea0bf5f5a85133e5b35156..180d2a3175658aede77035cda4c2379005dea39d 100644 (file)
@@ -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<OpeningTime> branchOpeningTimes;
 
        /**