diff artifact-database/src/main/resources/sql/org-h2-driver.properties @ 178:535e4ea2ef9b

Added code to get the attribute of a collection item artifacts/trunk@1404 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sun, 06 Mar 2011 10:27:16 +0000
parents a0eff2227588
children 644fd11ddd9f
line wrap: on
line diff
--- a/artifact-database/src/main/resources/sql/org-h2-driver.properties	Sun Mar 06 10:03:53 2011 +0000
+++ b/artifact-database/src/main/resources/sql/org-h2-driver.properties	Sun Mar 06 10:27:16 2011 +0000
@@ -48,6 +48,12 @@
     (id, collection_id, artifact_id, attribute) \
     VALUES (?, ?, ?, ?)
 
+collection.item.get.attribute= \
+    SELECT ci.attribute FROM collections_items ci \
+        INNER JOIN collection c ON ci.collection_id = c.id \
+        INNER JOIN attributes a ON ci.artifact_id = a.id \
+        WHERE c.gid = ? AND a.gid = ?
+
 # COLLECTIONS
 collections.id.nextval=SELECT NEXTVAL('COLLECTIONS_ID_SEQ')
 

http://dive4elements.wald.intevation.org