changeset 191:3bce5556a2e5

Fixed some sql statements that contained typos. artifacts/trunk@1421 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 08 Mar 2011 09:08:15 +0000
parents 7acf4a325bfe
children dad6071c9072
files ChangeLog artifact-database/src/main/resources/sql/org-h2-driver.properties artifact-database/src/main/resources/sql/org-postgresql-driver.properties
diffstat 3 files changed, 18 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Mar 08 08:25:24 2011 +0000
+++ b/ChangeLog	Tue Mar 08 09:08:15 2011 +0000
@@ -1,3 +1,9 @@
+2011-03-08  Ingo Weinzierl <ingo@intevation.de>
+
+	* artifact-database/src/main/resources/sql/org-h2-driver.properties,
+	  artifact-database/src/main/resources/sql/org-postgresql-driver.properties:
+	  Fixed some SQL statements that contained typos.
+
 2011-03-08  Ingo Weinzierl <ingo@intevation.de>
 
 	* artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java:
--- a/artifact-database/src/main/resources/sql/org-h2-driver.properties	Tue Mar 08 08:25:24 2011 +0000
+++ b/artifact-database/src/main/resources/sql/org-h2-driver.properties	Tue Mar 08 09:08:15 2011 +0000
@@ -50,15 +50,15 @@
 
 collection.item.get.attribute= \
     SELECT ci.attribute FROM collection_items ci \
-        INNER JOIN collection c ON ci.collection_id = c.id \
-        INNER JOIN attributes a ON ci.artifact_id = a.id \
+        INNER JOIN collections c ON ci.collection_id = c.id \
+        INNER JOIN artifacts a ON ci.artifact_id = a.id \
         WHERE c.gid = ? AND a.gid = ?
 
 collection.item.set.attribute= \
     UPDATE collection_items SET attribute = ? WHERE id IN ( \
         SELECT ci.id FROM collection_items ci \
-            INNER JOIN collection c ON ci.collection_id = c.id \
-            INNER JOIN attributes a ON ci.artifact_id = a.id \
+            INNER JOIN collections c ON ci.collection_id = c.id \
+            INNER JOIN artifacts a ON ci.artifact_id = a.id \
             WHERE c.gid = ? AND a.gid = ?)
 
 collection.item.id.cid.aid= \
@@ -82,11 +82,11 @@
 
 # COLLECTIONS
 collections.touch.by.gid =\
-    UPDATE collection SET last_access = CURRENT_TIMESTAMP \
+    UPDATE collections SET last_access = CURRENT_TIMESTAMP \
         WHERE gid = ?
 
 collections.touch.by.id =\
-    UPDATE collection SET last_access = CURRENT_TIMESTAMP \
+    UPDATE collections SET last_access = CURRENT_TIMESTAMP \
         WHERE id = ?
 
 collections.id.nextval=SELECT NEXTVAL('COLLECTIONS_ID_SEQ')
--- a/artifact-database/src/main/resources/sql/org-postgresql-driver.properties	Tue Mar 08 08:25:24 2011 +0000
+++ b/artifact-database/src/main/resources/sql/org-postgresql-driver.properties	Tue Mar 08 09:08:15 2011 +0000
@@ -50,15 +50,15 @@
 
 collection.item.get.attribute= \
     SELECT ci.attribute FROM collection_items ci \
-        INNER JOIN collection c ON ci.collection_id = c.id \
-        INNER JOIN attributes a ON ci.artifact_id = a.id \
+        INNER JOIN collections c ON ci.collection_id = c.id \
+        INNER JOIN artifacts a ON ci.artifact_id = a.id \
         WHERE c.gid = ?::uuid AND a.gid = ?::uuid
 
 collection.item.set.attribute= \
     UPDATE collection_items SET attribute = ? WHERE id IN ( \
         SELECT ci.id FROM collection_items ci \
-            INNER JOIN collection c ON ci.collection_id = c.id \
-            INNER JOIN attributes a ON ci.artifact_id = a.id \
+            INNER JOIN collections c ON ci.collection_id = c.id \
+            INNER JOIN artifacts a ON ci.artifact_id = a.id \
             WHERE c.gid = ?::uuid AND a.gid = ?::uuid)
 
 collection.item.id.cid.aid= \
@@ -82,11 +82,11 @@
 
 # COLLECTIONS
 collections.touch.by.gid =\
-    UPDATE collection SET last_access = CURRENT_TIMESTAMP \
+    UPDATE collections SET last_access = CURRENT_TIMESTAMP \
         WHERE gid = ?::uuid
 
 collections.touch.by.id =\
-    UPDATE collection SET last_access = CURRENT_TIMESTAMP \
+    UPDATE collections SET last_access = CURRENT_TIMESTAMP \
         WHERE id = ?
 collections.id.nextval=SELECT NEXTVAL('COLLECTIONS_ID_SEQ')
 

http://dive4elements.wald.intevation.org