I have noted a problem on filtering the view tables by keywords when there is a reference to other tables. The filtering process is not working. Give a look to this screenshot
The reference are defined correctly with these declarations in the controller:
$this->grocery_crud->set_relation('units_of_measure_id','units_of_measure','{unit_of_measure} ({id})', null, 'unit_of_measure');
$this->grocery_crud->set_relation('languages_id','languages','{name} - {language_short_key} ({id})', null, 'name');
Reading the log file I found this
Query error: Column 'name' in where clause is ambiguous - Invalid query: SELECT `formats`.*, CONCAT('', COALESCE(j1cfe157f.unit_of_measure, ''), ' (', COALESCE(j1cfe157f.id, ''), ')') as s1cfe157f, CONCAT('', COALESCE(jd21dc9dc.name, ''), ' - ', COALESCE(jd21dc9dc.language_short_key, ''), ' (', COALESCE(jd21dc9dc.id, ''), ')') as sd21dc9dc
FROM `formats`
LEFT JOIN `units_of_measure` as `j1cfe157f` ON `j1cfe157f`.`id` = `formats`.`units_of_measure_id`
LEFT JOIN `languages` as `jd21dc9dc` ON `jd21dc9dc`.`id` = `formats`.`languages_id`
WHERE `name` LIKE '%rectal%' ESCAPE '!'
LIMIT 10
The problem is clearly on the column “name” since both formats and languages have a column called “name”. The WHERE clause should have been generated preponing the main table name as in ‘formats.name’ . Anaone experienced the same trouble? is it possible to have a fixing? Thanks.