changeset 148:631177f92323

Fixed filter for LProbe and LMessung.
author Raimund Renkert <rrenkert@intevation.de>
date Fri, 14 Jun 2013 14:08:10 +0200
parents 2dd2c36a3b32
children 8e3ced604792
files src/main/java/de/intevation/lada/data/LMesswertRepository.java src/main/java/de/intevation/lada/data/LProbeRepository.java
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/data/LMesswertRepository.java	Fri Jun 14 10:38:28 2013 +0200
+++ b/src/main/java/de/intevation/lada/data/LMesswertRepository.java	Fri Jun 14 14:08:10 2013 +0200
@@ -116,7 +116,8 @@
             andFilter.add(cb.equal(member.get("messungsId"), filter.get("messung")));
         }
         criteria.distinct(true);
-        criteria.where(andFilter.toArray(new Predicate[andFilter.size()]));
+        Predicate ap = cb.and(andFilter.toArray(new Predicate[andFilter.size()]));
+        criteria.where(ap);
         List<LMesswert> result = filter(criteria);
         return new Response(true, 200, result);
     }
--- a/src/main/java/de/intevation/lada/data/LProbeRepository.java	Fri Jun 14 10:38:28 2013 +0200
+++ b/src/main/java/de/intevation/lada/data/LProbeRepository.java	Fri Jun 14 14:08:10 2013 +0200
@@ -99,7 +99,8 @@
             }
         }
         criteria.distinct(true);
-        criteria.where(andFilter.toArray(new Predicate[andFilter.size()]));
+        Predicate af = cb.and(andFilter.toArray(new Predicate[andFilter.size()]));
+        criteria.where(af);
         List<LProbeInfo> result = filter(criteria);
         return new Response(true, 200, result);
     }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)