Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DC435200C30 for ; Tue, 7 Mar 2017 23:06:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id DAEAD160B85; Tue, 7 Mar 2017 22:06:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3692D160B65 for ; Tue, 7 Mar 2017 23:06:00 +0100 (CET) Received: (qmail 1372 invoked by uid 500); 7 Mar 2017 22:05:01 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 1256 invoked by uid 99); 7 Mar 2017 22:05:01 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Mar 2017 22:05:01 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 5C48EDFF75; Tue, 7 Mar 2017 22:05:01 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: scnakandala@apache.org To: commits@airavata.apache.org Date: Tue, 07 Mar 2017 22:05:05 -0000 Message-Id: In-Reply-To: <2fc3ff37e20c4d66bcc72710a7f07065@git.apache.org> References: <2fc3ff37e20c4d66bcc72710a7f07065@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [05/50] [abbrv] airavata git commit: AIRAVATA-2316 Fixing loading user profile, eager fetch emails archived-at: Tue, 07 Mar 2017 22:06:01 -0000 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 Authored: Fri Feb 17 16:29:20 2017 -0500 Committer: Marcus Christie 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 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 queryParam = new HashMap(); queryParam.put(UserProfile._Fields.USER_ID.getFieldName(), userId); queryParam.put(UserProfile._Fields.GATEWAY_ID.getFieldName(), gatewayId); - List resultList = select(QueryConstants.FIND_USER_PROFILE_BY_USER_ID, 0, 1, queryParam); + List resultList = select(QueryConstants.FIND_USER_PROFILE_BY_USER_ID, 1, 0, queryParam); if (resultList != null && resultList.size() > 0) userProfile = resultList.get(0);