hooks/syncschema.py
changeset 4054 03c9a539d282
parent 4052 0c39ffd789ed
child 4075 e710f4052bd6
--- a/hooks/syncschema.py	Tue Dec 08 07:54:51 2009 -0800
+++ b/hooks/syncschema.py	Tue Dec 08 19:16:56 2009 +0100
@@ -378,12 +378,15 @@
                       'description': rdef.description,
                       'cardinality': rdef.cardinality,
                       'constraints': rdef.constraints,
+                      'permissions': rdef.get_permissions(),
                       'order': rdef.order})
+        groupmap = group_mapping(session)
         for specialization in eschema.specialized_by(False):
-            if rschema.has_rdef(specialization, rdef.object):
+            if (specialization, rdef.object) in rschema.rdefs:
                 continue
-            for rql, args in ss.frdef2rql(rschema, str(specialization),
-                                          rdef.object, props):
+            sperdef = RelationDefinitionSchema(specialization, rschema, rdef.object, props)
+            for rql, args in ss.rdef2rql(rschema, str(specialization),
+                                         rdef.object, sperdef, groupmap=groupmap):
                 session.execute(rql, args)
         # set default value, using sql for performance and to avoid
         # modification_date update