[Lada-commits] [PATCH 2 of 2] Fixed data type in database request

Wald Commits scm-commit at wald.intevation.org
Mon Dec 16 11:23:50 CET 2013


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1387189420 -3600
# Node ID 6ba7630c7e52a59dbad3afe023086cbe3089e02e
# Parent  479728d368092882266030f2165f7d43d1888bd3
Fixed data type in database request.

diff -r 479728d36809 -r 6ba7630c7e52 src/main/java/de/intevation/lada/validation/LMessungValidator.java
--- a/src/main/java/de/intevation/lada/validation/LMessungValidator.java	Mon Dec 16 11:22:56 2013 +0100
+++ b/src/main/java/de/intevation/lada/validation/LMessungValidator.java	Mon Dec 16 11:23:40 2013 +0100
@@ -136,11 +136,11 @@
         Response response = messwertRepository.filter(builder.getQuery());
         List<LMesswert> messwerte = (List<LMesswert>)response.getData();
         String query = "select messgroesse_id from \"S_mmt_messgroesse\" where mmt_id = '" + mmt + "'";
-        List<Object[]> results = readonlyRepository.getEntityManager().createNativeQuery(query).getResultList();
+        List<Integer> results = readonlyRepository.getEntityManager().createNativeQuery(query).getResultList();
         for(LMesswert messwert: messwerte) {
             boolean hit = false;
-            for (Object[] row: results) {
-                if (messwert.getMessgroesseId().equals(row[0].toString())) {
+            for (Integer row: results) {
+                if (messwert.getMessgroesseId().equals(row.toString())) {
                     hit = true;
                 }
             }


More information about the Lada-commits mailing list