Mercurial > dive4elements > framework
comparison artifact-database/src/main/resources/sql/org-h2-driver.properties @ 550:68f01f10624e
Introduced helper for finding the user name for a given artifact
author | gernotbelger |
---|---|
date | Fri, 09 Feb 2018 13:26:19 +0100 |
parents | e9abf747f6ce |
children |
comparison
equal
deleted
inserted
replaced
549:e781b847fdca | 550:68f01f10624e |
---|---|
194 FROM \ | 194 FROM \ |
195 users u INNER JOIN collections c ON u.id = c.owner_id \ | 195 users u INNER JOIN collections c ON u.id = c.owner_id \ |
196 INNER JOIN collection_items ci ON c.id = ci.collection_id \ | 196 INNER JOIN collection_items ci ON c.id = ci.collection_id \ |
197 INNER JOIN artifacts a ON a.id = ci.artifact_id \ | 197 INNER JOIN artifacts a ON a.id = ci.artifact_id \ |
198 ORDER BY u_gid, c_gid | 198 ORDER BY u_gid, c_gid |
199 | |
200 find.user.by.artifact = \ | |
201 SELECT users.id, users.name FROM users, collections, collection_items, artifacts \ | |
202 WHERE users.id = collections.owner_id AND \ | |
203 collections.id = collection_items.collection_id AND \ | |
204 collection_items.artifact_id = artifacts.id AND \ | |
205 artifacts.gid = ?::uuid |