Skip to content
Snippets Groups Projects
Unverified Commit f804a590 authored by Daniel's avatar Daniel
Browse files

FIX: Return each parent only once.

parent f94515cf
No related tags found
No related merge requests found
......@@ -54,9 +54,18 @@ ACL :
CREATE PROCEDURE db_2_0.retrieveEntityParents(in EntityID INT UNSIGNED)
BEGIN
SELECT parent AS ParentID, name AS ParentName, description AS ParentDescription, role AS ParentRole, (SELECT acl from entity_acl as a WHERE a.id=e.acl) AS ACL FROM isa_cache AS i JOIN entities AS e ON (i.parent=e.id AND i.child=EntityID and i.rpath=EntityID);
SELECT DISTINCT
parent AS ParentID,
name AS ParentName,
description AS ParentDescription,
role AS ParentRole,
(SELECT acl FROM entity_acl AS a WHERE a.id=e.acl) AS ACL
FROM
isa_cache AS i
JOIN
entities AS e
ON (i.parent=e.id AND i.child=EntityID AND i.rpath=EntityID);
END
//
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment