diff -r 38a4e83c8160 -r ade319674170 schema.py --- 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