Column 'name' in where clause is ambiguous
I have quite an extensive admin-panel with lots of columns and custom filters/queries.
This works fine for most options, but when I try to search for things (and sometimes with sorting but that's an issue for later), I get the error as mentioned in the title.
This is most likely caused by the fact that I have two tables with the column 'name': Patients and Practices, which makes SQL unsure about in what table to look for.
Part of the Laravel SQL error:
My columns are defined as followed:
What could be a good way to solve this problem? Thanks in advance!
1 Reply
Does adding specificity to declared relationships help? https://filamentphp.com/docs/3.x/panels/resources/global-search#globally-searching-across-multiple-columns