airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [05/50] [abbrv] airavata git commit: AIRAVATA-2316 Fixing loading user profile, eager fetch emails
Date Tue, 07 Mar 2017 22:05:05 GMT
AIRAVATA-2316 Fixing loading user profile, eager fetch emails


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/589392ef
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/589392ef
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/589392ef

Branch: refs/heads/develop
Commit: 589392ef0d4868d1c32970e31ca7fe0515990048
Parents: de26509
Author: Marcus Christie <machristie@apache.org>
Authored: Fri Feb 17 16:29:20 2017 -0500
Committer: Marcus Christie <machristie@apache.org>
Committed: Fri Feb 17 16:29:20 2017 -0500

----------------------------------------------------------------------
 .../airavata/user/registry/core/entities/UserProfileEntity.java    | 2 +-
 .../user/registry/core/repositories/UserProfileRepository.java     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/589392ef/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 6fe0700..1285efd 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
@@ -86,7 +86,7 @@ public class UserProfileEntity {
         this.userModelVersion = userModelVersion;
     }
 
-    @ElementCollection
+    @ElementCollection(fetch = FetchType.EAGER)
     @CollectionTable(name="USER_PROFILE_EMAIL", joinColumns = @JoinColumn(name="AIRAVATA_INTERNAL_USER_ID"))
     public List<String> getEmails() {
         return emails;

http://git-wip-us.apache.org/repos/asf/airavata/blob/589392ef/modules/user-profile/user-profile-core/src/main/java/org/apache/airavata/user/registry/core/repositories/UserProfileRepository.java
----------------------------------------------------------------------
diff --git a/modules/user-profile/user-profile-core/src/main/java/org/apache/airavata/user/registry/core/repositories/UserProfileRepository.java
b/modules/user-profile/user-profile-core/src/main/java/org/apache/airavata/user/registry/core/repositories/UserProfileRepository.java
index 07965e5..eee5963 100644
--- a/modules/user-profile/user-profile-core/src/main/java/org/apache/airavata/user/registry/core/repositories/UserProfileRepository.java
+++ b/modules/user-profile/user-profile-core/src/main/java/org/apache/airavata/user/registry/core/repositories/UserProfileRepository.java
@@ -50,7 +50,7 @@ public class UserProfileRepository extends AbstractRepository<UserProfile,
UserP
         Map<String, Object> queryParam = new HashMap<String, Object>();
         queryParam.put(UserProfile._Fields.USER_ID.getFieldName(), userId);
         queryParam.put(UserProfile._Fields.GATEWAY_ID.getFieldName(), gatewayId);
-        List<UserProfile> resultList = select(QueryConstants.FIND_USER_PROFILE_BY_USER_ID,
0, 1, queryParam);
+        List<UserProfile> resultList = select(QueryConstants.FIND_USER_PROFILE_BY_USER_ID,
1, 0, queryParam);
 
         if (resultList != null && resultList.size() > 0)
             userProfile =  resultList.get(0);


Mime
View raw message