diff artifact-database/src/main/resources/sql/org-postgresql-driver.properties @ 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 a85d889a1b0d
children 949d69ad3756
line wrap: on
line diff
--- 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