server/sources/native.py
changeset 10183 ff93dad2ae3a
parent 10178 4b33246cb43c
child 10187 0df931eb08de
child 10196 20d56b1f035e
equal deleted inserted replaced
10182:116b24efad0e 10183:ff93dad2ae3a
  1228         self.repo.hm.call_hooks('before_delete_entity', cnx, entity=entity)
  1228         self.repo.hm.call_hooks('before_delete_entity', cnx, entity=entity)
  1229         # remove is / is_instance_of which are added using sql by hooks, hence
  1229         # remove is / is_instance_of which are added using sql by hooks, hence
  1230         # unvisible as transaction action
  1230         # unvisible as transaction action
  1231         self.doexec(cnx, 'DELETE FROM is_relation WHERE eid_from=%s' % eid)
  1231         self.doexec(cnx, 'DELETE FROM is_relation WHERE eid_from=%s' % eid)
  1232         self.doexec(cnx, 'DELETE FROM is_instance_of_relation WHERE eid_from=%s' % eid)
  1232         self.doexec(cnx, 'DELETE FROM is_instance_of_relation WHERE eid_from=%s' % eid)
  1233         self.doexec(cnx, 'DELETE FROM cw_source_relation WHERE eid_from=%s' % self.eid)
  1233         self.doexec(cnx, 'DELETE FROM cw_source_relation WHERE eid_from=%s' % eid)
  1234         # XXX check removal of inlined relation?
  1234         # XXX check removal of inlined relation?
  1235         # delete the entity
  1235         # delete the entity
  1236         attrs = {'cw_eid': eid}
  1236         attrs = {'cw_eid': eid}
  1237         sql = self.sqlgen.delete(SQL_PREFIX + entity.cw_etype, attrs)
  1237         sql = self.sqlgen.delete(SQL_PREFIX + entity.cw_etype, attrs)
  1238         self.doexec(cnx, sql, attrs)
  1238         self.doexec(cnx, sql, attrs)