Re: Inverse proeprty is not updated when in other ontology
Posted by Jiba on
URL: http://owlready.306.s1.nabble.com/Inverse-proeprty-is-not-updated-when-in-other-ontology-tp2859p2866.html
Hi,
"with o2:" means that all modification to the quadstore is stored in ontology o2. Here, the removal of the parent relation is thus applied in o2. But as it is actually defined in o1, nothing is changed in the quadstore (hence the inverse relation is still present), but the value of the parent property, cached in memory, is wrongly updated.
I'm going to try to find a solution to that problem, in order to avoid having this inconsistent state... possibly the only solution is to raise an error when removing a relation from an ontology that does not contains this relation.
Also, notice that "assert b.child is None" is not a valid test here because b.child is a list. You should rather use "assert not b.child" or "assert b.child == []".
Jiba