changeset 3795:f210432f4383

Fix hibernate query flys-backend/trunk@5438 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Bjoern Ricks <bjoern.ricks@intevation.de>
date Wed, 12 Sep 2012 11:12:19 +0000
parents 42db09d101f3
children 61195d14b844
files flys-backend/src/main/java/de/intevation/flys/model/River.java
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/model/River.java	Wed Sep 12 10:28:26 2012 +0000
+++ b/flys-backend/src/main/java/de/intevation/flys/model/River.java	Wed Sep 12 11:12:19 2012 +0000
@@ -224,11 +224,12 @@
         Session session = SessionHolder.HOLDER.get();
 
         Query query = session.createQuery(
-        "select min(wqr.q) as min, max(wqr.q) as max from Wst w " +
-            "join WstColumns as wc " +
-            "join WstColumnQRange as wcqr " +
-            "join WstQRange as wqr " +
-            "where w.kind = 0 and river_id = :river_id");
+            "select min(wqr.q) as min, max(wqr.q) as max " +
+            "from Wst as w " +
+            "join w.columns as wc " +
+            "join wc.columnQRanges as wcqr " +
+            "join wcqr.wstQRange as wqr " +
+            "where w.kind = 0 and river_id = :river");
 
         query.setParameter("river", getId());
 

http://dive4elements.wald.intevation.org