Skip to content

Commit

Permalink
H-3774: Fix including data type children will not emit anything if no…
Browse files Browse the repository at this point in the history
… children exist (#5846)
  • Loading branch information
TimDiekmann authored Dec 10, 2024
1 parent 3022d2e commit 7db9d72
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,14 @@ where

let query = if include_data_type_children {
"
SELECT DISTINCT ON (ontology_id) schema, closed_schema
FROM data_type_inherits_from
JOIN data_types
ON ontology_id = source_data_type_ontology_id
OR ontology_id = target_data_type_ontology_id
WHERE target_data_type_ontology_id = ANY($1);
SELECT schema, closed_schema
FROM data_types
WHERE ontology_id = ANY($1)
OR ontology_id IN (
SELECT source_data_type_ontology_id
FROM data_type_inherits_from
WHERE target_data_type_ontology_id = ANY($1)
);
"
} else {
"
Expand Down

0 comments on commit 7db9d72

Please sign in to comment.