Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-mysqlbackend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-mysqlbackend
Commits
f804a590
Unverified
Commit
f804a590
authored
4 years ago
by
Daniel
Browse files
Options
Downloads
Patches
Plain Diff
FIX: Return each parent only once.
parent
f94515cf
Branches
t-distinct-parents
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
procedures/retrieveEntityParents.sql
+11
-2
11 additions, 2 deletions
procedures/retrieveEntityParents.sql
with
11 additions
and
2 deletions
procedures/retrieveEntityParents.sql
+
11
−
2
View file @
f804a590
...
...
@@ -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
//
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment