@classmethod
def cascade(cls, id, parent_id=None):
    """Delete the current object and the relative define in cascade.

    id: int
    parent_id: int for parent child relations

    """
    if cls.relations:
        for relation in cls.relations:
            if relation.get('model') and relation.get('relation_key'):
                model_elastic = relation.get('model')
                mod_elastic = __import__('model', fromlist=model_elastic)
                type_es = getattr(mod_elastic, model_elastic)
                type_es.delete({'query': {'term': {relation.get(
                    'relation_key'): id}}})
    if parent_id:
        cls.delete(id, parent_id)
    else:
        cls.delete(id)
