equal
deleted
inserted
replaced
598 def precommit_event(self): |
598 def precommit_event(self): |
599 rdef = self.entity.reverse_constrained_by[0] |
599 rdef = self.entity.reverse_constrained_by[0] |
600 # when the relation is added in the same transaction, the constraint |
600 # when the relation is added in the same transaction, the constraint |
601 # object is created by the operation adding the attribute or relation, |
601 # object is created by the operation adding the attribute or relation, |
602 # so there is nothing to do here |
602 # so there is nothing to do here |
603 if session.added_in_transaction(rdef.eid): |
603 if self.session.added_in_transaction(rdef.eid): |
604 self.cancelled = True |
604 self.cancelled = True |
605 return |
605 return |
606 subjtype, rtype, objtype = self.session.schema.schema_by_eid(rdef.eid) |
606 subjtype, rtype, objtype = self.session.schema.schema_by_eid(rdef.eid) |
607 self.prepare_constraints(subjtype, rtype, objtype) |
607 self.prepare_constraints(subjtype, rtype, objtype) |
608 cstrtype = self.entity.type |
608 cstrtype = self.entity.type |