Mercurial > dive4elements > framework
changeset 181:116482169b44
Adapted the sql statements for fetching all collections and all user collections from database.
artifacts/trunk@1407 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 07 Mar 2011 11:10:45 +0000 |
parents | 38fbbeffe8fe |
children | 7eebe707a034 |
files | ChangeLog artifact-database/src/main/resources/sql/org-h2-driver.properties |
diffstat | 2 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 <ingo@intevation.de> + + * 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 <sascha.teichmann@intevation.de> * artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java:
--- 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 = ?