Skip to content
Snippets Groups Projects
Commit 8c261043 authored by Magali Ruffier's avatar Magali Ruffier
Browse files

a term is not obsolete if is_obsolete = 0, not if is_obsolete is null

parent e2c6776f
No related branches found
No related tags found
No related merge requests found
......@@ -69,7 +69,7 @@ FROM ontology,
term,
subset
WHERE ontology.ontology_id = term.ontology_id
AND isnull(is_obsolete)
AND is_obsolete = 0
AND FIND_IN_SET(subset.name, term.subsets) > 0
);
......@@ -94,8 +94,8 @@ WHERE ontology.name = %s
AND FIND_IN_SET(%s, parent_term.subsets) > 0
AND parent_term.ontology_id = closure.ontology_id
AND child_term.ontology_id = closure.ontology_id
AND isnull(parent_term.is_obsolete)
AND isnull(child_term.is_obsolete)
AND parent_term.is_obsolete = 0
AND child_term.is_obsolete = 0
GROUP BY child_term.term_id, parent_term.term_id
);
......
......@@ -70,7 +70,7 @@ INSERT INTO closure
(child_term_id, parent_term_id, distance, subparent_term_id, ontology_id)
SELECT term_id, term_id, 0, NULL, ontology_id
FROM term
WHERE isnull(is_obsolete)
WHERE is_obsolete = 0
) );
$dbh->do(
......@@ -81,7 +81,7 @@ SELECT term_id, term_id, 0, NULL, r.ontology_id
FROM term t, relation r
WHERE term_id = child_term_id
AND t.ontology_id != r.ontology_id
AND isnull(is_obsolete)
AND is_obsolete = 0
) );
$dbh->do(
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment