Skip to content
Snippets Groups Projects
Commit 5580b9bf authored by Timm Fitschen's avatar Timm Fitschen
Browse files

Merge branch 'f-fix-18' into 'dev'

FIX: more restrictive insertion into isa_cache table

See merge request caosdb/caosdb-mysqlbackend!11
parents fd3697dc 1cdf2125
Branches
Tags
No related merge requests found
......@@ -60,7 +60,7 @@ insert_is_a_proc: BEGIN
p, -- New parent (directly)
concat(p, ">", i.rpath)) -- Else "p>super.rpath"
AS rpath
FROM isa_cache AS i WHERE i.child = p; -- Select rows with supertype
FROM isa_cache AS i WHERE i.child = p AND i.child != i.parent; -- Select rows with supertype
-- Propagate to descendants:
-- for each subtype of c: insert each supertype of p
......@@ -78,7 +78,7 @@ insert_is_a_proc: BEGIN
AS rpath
FROM
isa_cache as l INNER JOIN isa_cache as r
ON (l.parent = c AND c = r.child); -- Left: descendants of c, right: ancestors
ON (l.parent = c AND c = r.child AND l.child != l.parent); -- Left: descendants of c, right: ancestors
END;
//
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment