changeset 182:1c0afb01bc93

Importer: Fixed error in HQL statement. flys-backend/trunk@1493 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 17 Mar 2011 10:29:18 +0000
parents 4d9984411b3f
children 222f4db3430a
files flys-backend/ChangeLog flys-backend/src/main/java/de/intevation/flys/importer/Importer.java
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/ChangeLog	Thu Mar 17 10:00:56 2011 +0000
+++ b/flys-backend/ChangeLog	Thu Mar 17 10:29:18 2011 +0000
@@ -1,3 +1,8 @@
+2011-03-17	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* src/main/java/de/intevation/flys/importer/Importer.java:
+	  Fixed error in HQL statement.
+
 2011-03-17	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/utils/DBCPConnectionProvider.java:
--- a/flys-backend/src/main/java/de/intevation/flys/importer/Importer.java	Thu Mar 17 10:00:56 2011 +0000
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/Importer.java	Thu Mar 17 10:29:18 2011 +0000
@@ -40,8 +40,10 @@
     }
 
     public void writeRivers() {
-        Query query = session.createQuery("select River where name=:name");
+        log.debug("write rivers started");
+        Query query = session.createQuery("from River where name=:name");
         for (ImportRiver iriver: rivers) {
+            log.debug("writing river '" + iriver.getName() + "'");
             query.setString("name", iriver.getName());
             List<River> dbrivers = (List<River>)query.list();
             if (dbrivers.isEmpty()) {
@@ -49,6 +51,7 @@
                 session.save(dbriver);
             }
         }
+        log.debug("write rivers finished");
     }
 
     public void writeToDatabase() {

http://dive4elements.wald.intevation.org