[PATCH] 'start' is a reserved word in Oracle

Wald Commits scm-commit at wald.intevation.org
Thu Jun 27 16:24:58 CEST 2013


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1372343095 -7200
# Node ID d1502b8dd0918e5627e46c13fcae4b9b554eb648
# Parent  d30ae7275e5af1dc76052c0197b03282dca37697
'start' is a reserved word in Oracle

diff -r d30ae7275e5a -r d1502b8dd091 artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFactory.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFactory.java	Thu Jun 27 14:51:04 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFactory.java	Thu Jun 27 16:24:55 2013 +0200
@@ -55,7 +55,7 @@
     public static final String SQL_SELECT_EPOCHS =
         "SELECT DISTINCT " +
         "       sy.description AS description, " +
-        "       ti.start_time AS start, " +
+        "       ti.start_time AS startYear, " +
         "       ti.stop_time AS end, " +
         "       u.name AS unit" +
         "   FROM     sediment_yield sy " +
@@ -90,7 +90,7 @@
     public static final String SQL_SELECT_UNKNOWN_DATA =
         "SELECT" +
         "       sy.description AS description, " +
-        "       ti.start_time AS start, " +
+        "       ti.start_time AS startYear, " +
         "       ti.stop_time AS end, " +
         "       syv.value AS load, " +
         "       syv.station AS km, " +
@@ -109,7 +109,7 @@
     public static final String SQL_SELECT_UNKNOWN =
         "SELECT DISTINCT " +
         "    sy.description AS description, " +
-        "    ti.start_time AS start, " +
+        "    ti.start_time AS startYear, " +
         "    ti.stop_time AS end " +
         "FROM sediment_yield sy " +
         "    JOIN rivers r ON sy.river_id = r.id " +
@@ -268,7 +268,7 @@
         else if (type.equals("epoch")) {
             sqlQuery = session.createSQLQuery(SQL_SELECT_EPOCHS)
                 .addScalar("description", StandardBasicTypes.STRING)
-                .addScalar("start", StandardBasicTypes.DATE)
+                .addScalar("startYear", StandardBasicTypes.DATE)
                 .addScalar("end", StandardBasicTypes.DATE);
             sqlQuery.setString("name", river);
             sqlQuery.setDouble("startKm", startKm);
@@ -520,7 +520,7 @@
 
         sqlQuery = session.createSQLQuery(SQL_SELECT_UNKNOWN_DATA)
             .addScalar("description", StandardBasicTypes.STRING)
-            .addScalar("start", StandardBasicTypes.DATE)
+            .addScalar("startYear", StandardBasicTypes.DATE)
             .addScalar("end", StandardBasicTypes.DATE)
             .addScalar("load", StandardBasicTypes.DOUBLE)
             .addScalar("km", StandardBasicTypes.DOUBLE)
@@ -553,7 +553,7 @@
         Session session = SessionHolder.HOLDER.get();
         SQLQuery sqlQuery = session.createSQLQuery(SQL_SELECT_UNKNOWN)
             .addScalar("description", StandardBasicTypes.STRING)
-            .addScalar("start", StandardBasicTypes.DATE)
+            .addScalar("startYear", StandardBasicTypes.DATE)
             .addScalar("end", StandardBasicTypes.DATE);
         sqlQuery.setString("river", river);
         List<Object[]> results = sqlQuery.list();


More information about the Dive4elements-commits mailing list