code: def retrieve_object_query(self, view_kwargs, filter_field, filter_value):
          
          return self.session.query(self.model).filter(filter_field == filter_value)
docs: Build query to retrieve object
  
          :param dict view_kwargs: kwargs from the resource view
          :params sqlalchemy_field filter_field: the field to filter on
          :params filter_value: the value to filter with
          :return sqlalchemy query: a query from sqlalchemy