Hi,
I tried to reproduce your problem using the script below, but I was unable to. Could you help me to reproduce the problem?
Jiba
----8<---------
from owlready2 import *
onto1 = get_ontology("
http://test.org/onto1.owl")
onto2 = get_ontology("
http://test.org/onto2.owl")
onto3 = get_ontology("
http://test.org/onto3.owl")
with onto1:
class C1(Thing): pass
with onto2:
class C2(Thing): pass#equivalent_to = [C1]
C2("c2")
with onto3:
class C3(Thing): pass#equivalent_to = [C1]
C3("c3")
onto1.save("/tmp/onto1.owl")
onto2.save("/tmp/onto2.owl")
onto3.save("/tmp/onto3.owl")
w = World() # Use a different world to force reload the ontologies
onto1 = w.get_ontology("/tmp/onto1.owl").load()
onto2 = w.get_ontology("/tmp/onto2.owl").load()
onto3 = w.get_ontology("/tmp/onto3.owl").load()
onto1.imported_ontologies.append(onto2)
onto1.imported_ontologies.append(onto3)
onto1.C1.equivalent_to = [onto2.C2, onto3.C3]
sync_reasoner(w)
print(onto2.c2, onto2.c2.is_a)
print(onto3.c3, onto3.c3.is_a)
# => onto2.c2 [onto1.C1, onto2.C2, onto3.C3]
# => onto3.c3 [onto1.C1, onto2.C2, onto3.C3]