예제 #1
0
 def remove_entity(self,entity):
     try:
         self.delete_relations(entity)
         gc=GenericCache()
         gc.on_delete_entity(entity.entity_id, entity.type.name)
         DBHelper().delete(entity)
     except Exception, e:
         raise e
예제 #2
0
 def remove_entity_by_id(self,entityId,entityType=None,parent=None):
     try:
         entity=self.get_entity(entityId, entityType,parent)
         self.delete_relations(entity)
         gc=GenericCache()
         gc.on_delete_entity(entityId, entity.type.name)
         DBHelper().delete(entity)
     except Exception, e:
         raise e