changeset 1045:ba840385ad2e

flys/issue260: Datacage uses master_artifacts view now. flys-artifacts/trunk@2506 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 18 Aug 2011 14:58:17 +0000
parents a007a4368768
children 0a5eff5511b1
files flys-artifacts/ChangeLog flys-artifacts/doc/conf/meta-data-user.xml
diffstat 2 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Thu Aug 18 14:19:30 2011 +0000
+++ b/flys-artifacts/ChangeLog	Thu Aug 18 14:58:17 2011 +0000
@@ -1,3 +1,9 @@
+2011-08-18  Sascha L. Teichmann <sascha.teichmann@intevation.de>
+
+	Fixed flys/issue260
+
+	* doc/conf/meta-data-user.xml: Uses master_artifacts view now.
+
 2011-08-18  Sascha L. Teichmann <sascha.teichmann@intevation.de>
 
 	* doc/conf/datacage.sql: Added view master_artifacts to select
--- a/flys-artifacts/doc/conf/meta-data-user.xml	Thu Aug 18 14:19:30 2011 +0000
+++ b/flys-artifacts/doc/conf/meta-data-user.xml	Thu Aug 18 14:58:17 2011 +0000
@@ -15,12 +15,12 @@
         </dc:statement>
         <dc:elements>
           <dc:context>
-            <dc:statement>SELECT a.id AS a_id, a.state AS a_state, a.gid AS a_gid, a.creation AS a_creation
-                          FROM collection_items ci JOIN artifacts a ON ci.artifact_id = a.id
-                          WHERE collection_id = ${collection_id} AND a.gid &lt;&gt; CAST(${artifact-id} AS uuid)
-                          AND EXISTS (SELECT id FROM artifact_data WHERE artifact_id = a.id AND k = 'river' AND v = ${river})
+            <dc:statement>SELECT id AS a_id, state AS a_state, gid AS a_gid, creation AS a_creation
+                          FROM   master_artifacts m
+                          WHERE  collection_id = ${collection_id} AND gid &lt;&gt; CAST(${artifact-id} AS uuid)
+                                 AND EXISTS (
+                                    SELECT id FROM artifact_data WHERE artifact_id = m.id AND k = 'river' AND v = ${river})
             </dc:statement>
-            <dc:comment> --- TODO: We only need the 'master' artifacts! --- </dc:comment>
             <dc:elements>
               <dc:choose>
                 <dc:when test="$current-state-id = 'state.winfo.waterlevel'">

http://dive4elements.wald.intevation.org