Custom Model Enum Filter not working

Using custom model in enterprise edition - I have a new custom field working and filtering as expected (I could display custom data with a callback, but could not get the filter working). But the enum columns are not filtering correctly. In this case yes or no are the options in the field. When using the default GC model the enum (yes, no) columns filter as expected.

Any suggestions or updates to the _getQueryModelObject function would be appreciated. Varchar columns filter as expect with both the default model and the _getQueryModelObject sample custom model.

I turned on query logging and the where clause is getting formed as like and =
WHERE active LIKE ‘%=yes%’ ESCAPE ‘!’

Query output works fine without the “=”. I have run similar queries direct in CodeIgnitor (3.1.11) and confirmed this is getting added by the $this->_filters object which seems to set the $filter_value with a “=” prepended .

I am using the default GC example model code for the _getQueryModelObject function…

    if (!empty($this->_filters)) {
        foreach ($this->_filters as $filter_name => $filter_value) {
            if ($filter_name !== 'fullname') {
                if (is_array($filter_value)) {
                    foreach ($filter_value as $value) {
                        $this->db->like($filter_name, $value);
                    }
                } else {
                    $this->db->like($filter_name, $filter_value);
                }
            } else {...

Please and thanks!

Update - and a work around!
I did try setting the field type in the custom model for the table field (enum and enum_searchable), but setting an existing column to those field types breaks GC. So still looking for a solution using enum.

On a whim I decided to try setting that yes|no enum field to varchar. That worked as far as filtering goes! Although then you lose the enum functionality on edit.

    $YNenumFieldType = new ModelFieldType();
    $YNenumFieldType->dataType = 'varchar';  //allows filtering, but lose enum on edit
    $fieldTypes['active'] = $YNenumFieldType;

Is there a way to only change the fieldTypeColumn definition in the custom model?

I tried over riding in the controller but both of these broke GC
//$crud->fieldType(‘active’, ‘enum’);
// $crud->fieldTypeColumn(‘active’, ‘enum’);