[schema] set composite on state_of / transition_of stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 28 Sep 2009 11:06:18 +0200
branchstable
changeset 3499 9161c215b954
parent 3498 838ef1f527ab
child 3500 ab10d1cb53ff
[schema] set composite on state_of / transition_of
misc/migration/3.5.3_Any.py
schemas/workflow.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/migration/3.5.3_Any.py	Mon Sep 28 11:06:18 2009 +0200
@@ -0,0 +1,2 @@
+sync_schema_props_perms('state_of')
+sync_schema_props_perms('transition_of')
--- a/schemas/workflow.py	Mon Sep 28 11:02:24 2009 +0200
+++ b/schemas/workflow.py	Mon Sep 28 11:06:18 2009 +0200
@@ -57,7 +57,7 @@
     allowed_transition = SubjectRelation('BaseTransition', cardinality='**',
                                          constraints=[RQLConstraint('S state_of WF, O transition_of WF')],
                                          description=_('allowed transitions from this state'))
-    state_of = SubjectRelation('Workflow', cardinality='1*',
+    state_of = SubjectRelation('Workflow', cardinality='1*', composite='object',
                                description=_('workflow to which this state belongs'),
                                constraints=[RQLUniqueConstraint('S name N, Y state_of O, Y name N')])
 
@@ -80,7 +80,7 @@
     require_group = SubjectRelation('CWGroup', cardinality='**',
                                     description=_('group in which a user should be to be '
                                                   'allowed to pass this transition'))
-    transition_of = SubjectRelation('Workflow', cardinality='1*',
+    transition_of = SubjectRelation('Workflow', cardinality='1*', composite='object',
                                     description=_('workflow to which this transition belongs'),
                                     constraints=[RQLUniqueConstraint('S name N, Y transition_of O, Y name N')])