--- a/server/test/data/schema.py Tue Sep 14 08:48:44 2010 +0200
+++ b/server/test/data/schema.py Thu Sep 16 18:56:35 2010 +0200
@@ -20,7 +20,8 @@
SubjectRelation, RichString, String, Int, Float,
Boolean, Datetime)
from yams.constraints import SizeConstraint
-from cubicweb.schema import (WorkflowableEntityType, RQLConstraint,
+from cubicweb.schema import (WorkflowableEntityType,
+ RQLConstraint, RQLUniqueConstraint,
ERQLExpression, RRQLExpression)
class Affaire(WorkflowableEntityType):
@@ -94,7 +95,10 @@
migrated_from = SubjectRelation('Note')
attachment = SubjectRelation('File')
- inline1 = SubjectRelation('Affaire', inlined=True, cardinality='?*')
+ inline1 = SubjectRelation('Affaire', inlined=True, cardinality='?*',
+ constraints=[RQLUniqueConstraint('S type T, S inline1 A1, A1 todo_by C, '
+ 'Y type T, Y inline1 A2, A2 todo_by C',
+ 'S,Y')])
todo_by = SubjectRelation('CWUser')
class Personne(EntityType):