Skip to content
Snippets Groups Projects
Verified Commit 2ddf553f authored by Timm Fitschen's avatar Timm Fitschen
Browse files

Merge branch 'dev' into f-versioning

parents 9e1eaf35 1d153346
No related branches found
No related tags found
No related merge requests found
# Changelog
# Changelog #
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [Unreleased] ##
### Added
### Added ###
### Changed
### Changed ###
### Deprecated
### Deprecated ###
* Table `transaction_log` is deprecated. The functionality is being replaced by the `transactions` table.
### Fixed
### Fixed ###
- Fixed several bugs when an Entity inherits from itself (#18, caosdb-server #85).
>>>>>>> dev
......@@ -47,6 +47,7 @@ insert_is_a_proc: BEGIN
-- Any additional entries would be redundant.
LEAVE insert_is_a_proc;
END IF;
-- Note: also for the next insertions, ignore existing lines with p == c
-- Insert ancestors older than parents:
-- for each supertype of p
......@@ -60,7 +61,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 +79,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