Conversation
Fix of a bug if the table column are ambiguous.
|
Hello @omv58, Can you please provide an example of what this code is fixing? Unfortunately I can't merge this code as I can't understand what problem is trying to solve. For example the code that didn't work for you and what was the expected behaviour. Regards |
|
hi @scoumbourdis i guess the ambigous table column is a very old problem in GC, this solves partially that situation when tje join happened for relationship and two columns are equal and the search doe snot work |
|
The fix applies when you have 2 tables with a column with the same name. When this happens, the search does not work. The solution only references the table whose column is: $this->table_name. '.'. $Field. |
|
Unfortunately It seems that the fix doesn't work as it has issues with the set_relation function. For example the line here: https://github.com/scoumbourdis/grocery-crud/blob/master/application/libraries/Grocery_CRUD.php#L608 that it is using the table_name as the field name. I will try to find some time to investigate on the issue so I can provide another solution. |
|
hi @scoumbourdis this issue is still happened! i just discovered we can fixid by using |
Fix of a bug if the table column are ambiguous.