changeset 2691 | ade319674170 |
parent 2632 | 920bfaff60a4 |
child 2716 | 2f6edb0e9626 |
--- a/schema.py Tue Aug 04 18:58:54 2009 +0200 +++ b/schema.py Tue Aug 04 19:36:22 2009 +0200 @@ -516,6 +516,11 @@ def __init__(self, restriction): self.restriction = restriction + def check_consistency(self, subjschema, objschema): + if objschema.is_final(): + raise BadSchemaDefinition("unique constraint doesn't apply to " + "final entity type") + def serialize(self): return self.restriction