public function filterQuery(QueryBuilder &$query, &$selects = null)
    {
        $model = $this->config->getDataModel();

        //if this field has a min/max range, set it
        if ($this->getOption('min_max')) {
            if ($minValue = $this->getOption('min_value')) {
                $query->where($model->getTable().'.'.$this->getOption('field_name'), '>=', $minValue);
            }

            if ($maxValue = $this->getOption('max_value')) {
                $query->where($model->getTable().'.'.$this->getOption('field_name'), '<=', $maxValue);
            }
        }
    }