diff artifact-database/src/main/resources/sql/org-postgresql-driver.properties @ 170:ac0f8bd97277

Fix parameter propagation of creation time ond collection names. artifacts/trunk@1395 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 04 Mar 2011 10:51:10 +0000
parents c9c27aca2f70
children 940ed629419f
line wrap: on
line diff
--- a/artifact-database/src/main/resources/sql/org-postgresql-driver.properties	Fri Mar 04 09:56:35 2011 +0000
+++ b/artifact-database/src/main/resources/sql/org-postgresql-driver.properties	Fri Mar 04 10:51:10 2011 +0000
@@ -49,14 +49,16 @@
     INSERT INTO collections (id, gid, name, owner_id, creation, last_access, ttl) \
     VALUES (?, ?::uuid, ?, ?, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, ?)
 
+collection.creation.time=SELECT creation from collections WHERE id = ?
+
 collections.select.user= \
     SELECT c.gid, c.name, c.creation, u.gid FROM \
-    collections c OUTER LEFT JOIN user u ON c.owner_id = u.id \
+    collections c OUTER LEFT JOIN users u ON c.owner_id = u.id \
     WHERE u.gid = ?::uuid
 
 collections.select.all= \
     SELECT c.gid, c.name, c.creation, u.gid FROM \
-    collections c OUTER LEFT JOIN user u ON c.owner_id = u.id
+    collections c OUTER LEFT JOIN users u ON c.owner_id = u.id
 
 users.collections=SELECT collection_id, gid, name FROM collections WHERE owner_id = ?
 users.collection.ids=SELECT collection_id FROM collections WHERE owner_id = ?

http://dive4elements.wald.intevation.org