'Returns a SQLAlchemy criterion derived for a single filter. Single filter
is the most basic filter--usually a string--and cannot be a list.'

def get_single_filter(self, user, a_filter):

    if (self.key.find('.') > (-1)):
        a_key = self.key.split('.')[1]
    else:
        a_key = self.key
    model_class_key_field = getattr(self.model_class, a_key)
    return func.lower(model_class_key_field).like((('%' + a_filter.lower()) + '%'))
