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

Uuid not working #1260

Closed
LucasTeodoro opened this issue Oct 24, 2019 · 3 comments
Closed

Uuid not working #1260

LucasTeodoro opened this issue Oct 24, 2019 · 3 comments

Comments

@LucasTeodoro
Copy link

Illuminate\Database\QueryException : SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: uuid = integer
LINE 1: ...les"."role_id" where "model_has_roles"."model_id" in (7) and...
^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts. (SQL: select "roles".*, "model_has_roles"."model_id" as "pivot_model_id", "model_has_roles"."role_id" as "pivot_role_id", "model_has_roles"."model_type" as "pivot_model_type" from "roles" inner join "model_has_roles" on "roles"."id" = "model_has_roles"."role_id" where "model_has_roles"."model_id" in (7) and "model_has_roles"."model_type" = App\Models\System\User)

@sergejostir
Copy link
Contributor

Did you do appropriate modifications (migrations and configuration) to actually make it working?

Here are some ideas
#948

@LucasTeodoro
Copy link
Author

Yes i made.

I found a solution by declaring
protected $keyType = "string";

@sergejostir
Copy link
Contributor

sergejostir commented Oct 24, 2019

I see. So your issue was not even related to this package, but to Laravel in general.

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

3 participants