-
-
Notifications
You must be signed in to change notification settings - Fork 383
whereHasPermisison with Teams throws SQLSTATE[23000] team_id is ambiguous #695
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
Comments
Use |
Correct. In my example above, you can see that the permission name is This is the output of the
But if I then print out the
Almost identical query, except that it added table names for
it worked. You'll notice that I added table names |
Describe the bug
I'm using Teams and when I try to get users with specific permission with
whereHasPermission
, I get the following error:SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'team_id' in where clause is ambiguous
.The code I'm using is:
But if I replace the
whereHasPermisison
withwhereHas
, it works:The text was updated successfully, but these errors were encountered: