"nature": "foreign_key" } for attribute in self.relations[leg.entity_name]["columns"] if attribute["primary"]) else: already_rejected = True self.relations[entity_name]["columns"].extend([{ "attribute": attribute.label, "data_type": attribute.data_type, "association_name": association.cartouche, "primary_relation_name": None, "leg_annotation": None, "primary": False, "foreign": True, "nature": "foreign_attribute", } for attribute in association.attributes]) def add_sorting_this_relation_number(self): this_relation_number = itertools.count(1) for row in self.mcd.rows: for box in row: if box.name in self.relations: self.relations[box.name]["this_relation_number"] = this_relation_number.next() if __name__=="__main__": import sys sys.path.append("/Users/aristide/Dropbox/Sites/mocodo_online/mocodo") from mocodo import main main()
def main(): mocodo.main()