equal
deleted
inserted
replaced
686 new.add(eschema.type) |
686 new.add(eschema.type) |
687 # check if attributes has been added to existing entities |
687 # check if attributes has been added to existing entities |
688 for rschema in newcubes_schema.relations(): |
688 for rschema in newcubes_schema.relations(): |
689 existingschema = self.repo.schema.rschema(rschema.type) |
689 existingschema = self.repo.schema.rschema(rschema.type) |
690 for (fromtype, totype) in rschema.rdefs: |
690 for (fromtype, totype) in rschema.rdefs: |
691 if (fromtype, totype) in existingschema.rdefs: |
691 # if rdef already exists or is infered from inheritance, |
|
692 # don't add it |
|
693 if (fromtype, totype) in existingschema.rdefs \ |
|
694 or rschema.rdefs[(fromtype, totype)].infered: |
692 continue |
695 continue |
693 # check we should actually add the relation definition |
696 # check we should actually add the relation definition |
694 if not (fromtype in new or totype in new or rschema in new): |
697 if not (fromtype in new or totype in new or rschema in new): |
695 continue |
698 continue |
696 self.cmd_add_relation_definition(str(fromtype), rschema.type, |
699 self.cmd_add_relation_definition(str(fromtype), rschema.type, |