hooks/syncschema.py
changeset 3659 993997b4b41d
parent 3589 a5432f99f2d9
child 3720 5376aaadd16b
equal deleted inserted replaced
3658:d8f2ec7e91fa 3659:993997b4b41d
   354             except Exception, ex:
   354             except Exception, ex:
   355                 self.error('error while creating index for %s.%s: %s',
   355                 self.error('error while creating index for %s.%s: %s',
   356                            table, column, ex)
   356                            table, column, ex)
   357         # final relations are not infered, propagate
   357         # final relations are not infered, propagate
   358         try:
   358         try:
   359             eschema = self.schema.eschema(rdef.subject)
   359             eschema = self._cw.vreg.schema.eschema(rdef.subject)
   360         except KeyError:
   360         except KeyError:
   361             return # entity type currently being added
   361             return # entity type currently being added
   362         # propagate attribute to children classes
   362         # propagate attribute to children classes
   363         rschema = self.schema.rschema(rdef.name)
   363         rschema = self._cw.vreg.schema.rschema(rdef.name)
   364         # if relation type has been inserted in the same transaction, its final
   364         # if relation type has been inserted in the same transaction, its final
   365         # attribute is still set to False, so we've to ensure it's False
   365         # attribute is still set to False, so we've to ensure it's False
   366         rschema.final = True
   366         rschema.final = True
   367         # XXX 'infered': True/False, not clear actually
   367         # XXX 'infered': True/False, not clear actually
   368         props.update({'constraints': rdef.constraints,
   368         props.update({'constraints': rdef.constraints,