AIRAVATA-2316 Eager fetch all UserProfile associations
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/08fd8c40 Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/08fd8c40 Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/08fd8c40 Branch: refs/heads/develop Commit: 08fd8c4081ae8b0cdf8798e8c6d88555c596274f Parents: e342063 Author: Marcus Christie <[email protected]> Authored: Wed Feb 22 17:03:34 2017 -0500 Committer: Anuj Bhandar <[email protected]> Committed: Tue Feb 28 13:07:18 2017 -0500 ---------------------------------------------------------------------- .../user/registry/core/entities/UserProfileEntity.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/08fd8c40/modules/user-profile/user-profile-core/src/main/java/org/apache/airavata/user/registry/core/entities/UserProfileEntity.java ---------------------------------------------------------------------- diff --git a/modules/user-profile/user-profile-core/src/main/java/org/apache/airavata/user/registry/core/entities/UserProfileEntity.java b/modules/user-profile/user-profile-core/src/main/java/org/apache/airavata/user/registry/core/entities/UserProfileEntity.java index 1285efd..81bf18e 100644 --- a/modules/user-profile/user-profile-core/src/main/java/org/apache/airavata/user/registry/core/entities/UserProfileEntity.java +++ b/modules/user-profile/user-profile-core/src/main/java/org/apache/airavata/user/registry/core/entities/UserProfileEntity.java @@ -114,7 +114,7 @@ public class UserProfileEntity { this.orcidId = orcidId; } - @ElementCollection + @ElementCollection(fetch = FetchType.EAGER) @CollectionTable(name="USER_PROFILE_PHONE", joinColumns = @JoinColumn(name="AIRAVATA_INTERNAL_USER_ID")) public List<String> getPhones() { return phones; @@ -133,7 +133,7 @@ public class UserProfileEntity { this.country = country; } - @ElementCollection + @ElementCollection(fetch = FetchType.EAGER) @CollectionTable(name="USER_PROFILE_NATIONALITY", joinColumns = @JoinColumn(name="AIRAVATA_INTERNAL_USER_ID")) public List<String> getNationality() { return nationality; @@ -207,7 +207,7 @@ public class UserProfileEntity { this.comments = comments; } - @ElementCollection + @ElementCollection(fetch = FetchType.EAGER) @CollectionTable(name="USER_PROFILE_LABELED_URI", joinColumns = @JoinColumn(name="AIRAVATA_INTERNAL_USER_ID")) public List<String> getLabeledURI() { return labeledURI; @@ -236,7 +236,7 @@ public class UserProfileEntity { this.timeZone = timeZone; } - @OneToOne(targetEntity = NSFDemographicsEntity.class, cascade = CascadeType.ALL, mappedBy = "userProfile") + @OneToOne(targetEntity = NSFDemographicsEntity.class, cascade = CascadeType.ALL, mappedBy = "userProfile", fetch = FetchType.EAGER) public NSFDemographicsEntity getNsfDemographics() { return nsfDemographics; }
