'ISSUES:
* Other entities related to this new document may be not already
include into the database (ie: these documents are added on future
changes)'

def add_entity_from_doc(self, document):

    entity = server.models.FaradayEntity.parse(document)
    if (entity is None):
        return False
    entity.add_relationships_from_db(self.__db_conn.session)
    self.__db_conn.session.add(entity)
    try:
        self.__db_conn.session.commit()
        logger.info(u'New    {}    ({})    was    added    in    Workspace    {}'.format(entity.entity_metadata.document_type, getattr(entity, 'name', '<no-name>'), self.__db_conn.db_name))
    except IntegrityError as e:
        self.__db_conn.session.rollback()
        return False
    return True
