Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate Columns #187

Open
Justicea83 opened this issue Feb 7, 2019 · 1 comment
Open

Duplicate Columns #187

Justicea83 opened this issue Feb 7, 2019 · 1 comment

Comments

@Justicea83
Copy link

ambiguous columns
I dont even want that column involved in the searches
'columns' => [
'students.fname' => 10,
'students.lname' => 10,
'students.mname' => 10,
'students.school_id'=>0,
'transactions.school_id'=>0,
],
'joins' => [
'students' => ['transactions.student_id','students.id'],
],
it gives errors

@ricardo
Copy link

ricardo commented Jan 22, 2022

The problem is probably on another query of yours, not searchable. E.g if the ambiguous column is school_id:

$transactions = Transaction::where('school_id', $school_id)->search($search);

You could do as such:

$transactions = Transaction::where('transactions.school_id', $school_id)->search($search);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants