You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your issue may already be reported!
Please search on the issue tracker before creating one.
Expected Behavior
It should be possible to use the same column name on a joined table without SQL errors
Current Behavior
If a column name specified in the $searchable array also exists in a joined table (e.g. in another scope), a SQL error occurs because the column name is ambiguous
Possible Solution
When using any column in the $searchable array, it should be prefixed with the table name associated with the repository
Steps to Reproduce (for bugs)
Add parent_id to the $searchable array
Add a custom scope which joins to another table and uses parent_id in that table
Code fails with an ambiguous column
Context
We have generic names on several tables so we have had to work around this by removing any clashing names from the $searchable array and adding custom scopes to search on that field, thus defeating the point of the array.
Your Environment
Version used: 1.8
Browser Name and version: N/A
Operating System and version (desktop or mobile): N/A but Ubuntu
Link to your project: Private project
System GA
The text was updated successfully, but these errors were encountered:
Your issue may already be reported!
Please search on the issue tracker before creating one.
Expected Behavior
It should be possible to use the same column name on a joined table without SQL errors
Current Behavior
If a column name specified in the
$searchable
array also exists in a joined table (e.g. in another scope), a SQL error occurs because the column name is ambiguousPossible Solution
When using any column in the
$searchable
array, it should be prefixed with the table name associated with the repositorySteps to Reproduce (for bugs)
parent_id
to the$searchable
arrayparent_id
in that tableContext
We have generic names on several tables so we have had to work around this by removing any clashing names from the
$searchable
array and adding custom scopes to search on that field, thus defeating the point of the array.Your Environment
System GA
The text was updated successfully, but these errors were encountered: