# HG changeset patch # User Ingo Weinzierl # Date 1299496245 0 # Node ID 116482169b44bb56faf43ac25c44b42ae0a74d00 # Parent 38fbbeffe8fef5a305d71de1a475324390d83872 Adapted the sql statements for fetching all collections and all user collections from database. artifacts/trunk@1407 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 38fbbeffe8fe -r 116482169b44 ChangeLog --- a/ChangeLog Sun Mar 06 11:49:00 2011 +0000 +++ b/ChangeLog Mon Mar 07 11:10:45 2011 +0000 @@ -1,3 +1,10 @@ +2011-03-07 Ingo Weinzierl + + * artifact-database/src/main/resources/sql/org-h2-driver.properties: + Adapted the sql statement to fetch all collections and all user + collections from database (see rev1399 for more details). + s/OUTER LEFT/LEFT OUTER/ solves the collection listing problem. + 2011-03-06 Sascha L. Teichmann * artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java: diff -r 38fbbeffe8fe -r 116482169b44 artifact-database/src/main/resources/sql/org-h2-driver.properties --- a/artifact-database/src/main/resources/sql/org-h2-driver.properties Sun Mar 06 11:49:00 2011 +0000 +++ b/artifact-database/src/main/resources/sql/org-h2-driver.properties Mon Mar 07 11:10:45 2011 +0000 @@ -104,12 +104,12 @@ collections.select.user= \ SELECT c.gid, c.name, c.creation, u.gid FROM \ - collections c OUTER LEFT JOIN users u ON c.owner_id = u.id \ + collections c LEFT OUTER JOIN users u ON c.owner_id = u.id \ WHERE u.gid = ? collections.select.all= \ SELECT c.gid, c.name, c.creation, u.gid FROM \ - collections c OUTER LEFT JOIN users u ON c.owner_id = u.id + collections c LEFT OUTER 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 = ?