airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject airavata git commit: fixing duplicate entries from search results
Date Fri, 24 Feb 2017 20:07:03 GMT
Repository: airavata
Updated Branches:
  refs/heads/develop af4a04ec6 -> 1378dbdb0


fixing duplicate entries from search results


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

Branch: refs/heads/develop
Commit: 1378dbdb0b7eafd96228ee7929bb77c4406c0096
Parents: af4a04e
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Fri Feb 24 15:06:59 2017 -0500
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Fri Feb 24 15:06:59 2017 -0500

----------------------------------------------------------------------
 .../sharing/registry/db/repositories/EntityRepository.java         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/1378dbdb/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java
b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java
index 4cf06f7..2d16d34 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java
@@ -57,7 +57,7 @@ public class EntityRepository extends AbstractRepository<Entity, EntityEntity,
E
             groupIdString += groupId + "','";
         groupIdString = groupIdString.substring(0, groupIdString.length()-2);
 
-        String query = "SELECT E.* FROM ENTITY AS E INNER JOIN SHARING AS S ON (E.ENTITY_ID=S.ENTITY_ID
AND E.DOMAIN_ID=S.DOMAIN_ID) WHERE " +
+        String query = "SELECT DISTINCT E.* FROM ENTITY AS E INNER JOIN SHARING AS S ON (E.ENTITY_ID=S.ENTITY_ID
AND E.DOMAIN_ID=S.DOMAIN_ID) WHERE " +
                 "E.DOMAIN_ID = '" + domainId + "' AND " + "S.GROUP_ID IN(" + groupIdString
+ ") AND ";
 
         for(SearchCriteria searchCriteria : filters){


Mime
View raw message