[PATCH] (issue1763) We have UNIQUE(station, bedHeight) since Rev 2d16f4a0bdcc and comparing with the other parameters will never return any row if any of them is null

Wald Commits scm-commit at wald.intevation.org
Fri Apr 10 17:42:38 CEST 2015


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1428680530 -7200
# Node ID 19c38a47a27625d2814573bc03910c9304bdf2d8
# Parent  6e105764ba14177ef807b99dfdbf31c087e216a2
(issue1763) We have UNIQUE(station, bedHeight) since Rev 2d16f4a0bdcc and comparing with the other parameters will never return any row if any of them is null.

diff -r 6e105764ba14 -r 19c38a47a276 backend/src/main/java/org/dive4elements/river/importer/ImportBedHeightValue.java
--- a/backend/src/main/java/org/dive4elements/river/importer/ImportBedHeightValue.java	Fri Apr 10 13:26:59 2015 +0200
+++ b/backend/src/main/java/org/dive4elements/river/importer/ImportBedHeightValue.java	Fri Apr 10 17:42:10 2015 +0200
@@ -69,18 +69,10 @@
             Query query = session.createQuery(
                 "from BedHeightValue where " +
                 "   bedHeight=:bedHeight and " +
-                "   station=:station and " +
-                "   height=:height and " +
-                "   uncertainty=:uncertainty and " +
-                "   dataGap=:dataGap and " +
-                "   soundingWidth=:soundingWidth");
+                "   station=:station");
 
             query.setParameter("bedHeight", bedHeight);
             query.setParameter("station", station);
-            query.setParameter("height", height);
-            query.setParameter("uncertainty", uncertainty);
-            query.setParameter("dataGap", dataGap);
-            query.setParameter("soundingWidth", soundingWidth);
 
             List<BedHeightValue> values = query.list();
             if (values.isEmpty()) {


More information about the Dive4Elements-commits mailing list