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!