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 search results issue.
Date Sun, 31 May 2015 22:01:08 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 7bc175fe3 -> 8c420de55


Fixing duplicate search results issue.


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

Branch: refs/heads/master
Commit: 8c420de55aa7254742f94a197509b6444455b665
Parents: 7bc175f
Author: Supun Nakandala <scnakandala@apache.org>
Authored: Mon Jun 1 03:30:37 2015 +0530
Committer: Supun Nakandala <scnakandala@apache.org>
Committed: Mon Jun 1 03:30:37 2015 +0530

----------------------------------------------------------------------
 .../persistance/registry/jpa/resources/WorkerResource.java         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/8c420de5/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
index 4744de9..60b003f 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
@@ -627,7 +627,7 @@ public class WorkerResource extends AbstractResource {
         try {
             String query;
             if(filters.get(StatusConstants.STATE) != null) {
-                query = "SELECT e FROM Experiment e " +
+                query = "SELECT DISTINCT (e) FROM Experiment e " +
                         "JOIN e.statuses s LEFT JOIN FETCH e.statuses WHERE " +
                         "s.statusType='" + StatusType.EXPERIMENT + "' AND ";
                 String experimentState = ExperimentState.valueOf(filters.get(StatusConstants.STATE)).toString();


Mime
View raw message