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

[Bug] use uuid instead of id as primary key error #189

Open
C0d9Hunter opened this issue Apr 4, 2024 · 2 comments
Open

[Bug] use uuid instead of id as primary key error #189

C0d9Hunter opened this issue Apr 4, 2024 · 2 comments

Comments

@C0d9Hunter
Copy link

I'm working on a laravel v10 project, filament v3. My producer model defined as such:

  • uuid
  • name,
  • etc...

when I try to export I get this error on the image

filament export error

error in English: SQLSTATE[42883]: Undefined function: 7 ERROR: operator doesn't exist: text = integer LINE 1: select * from "posts" where "posts". "uuid" in (0) order by "... ^ HINT: No operator matches the given name and argument types.

@pxlrbt
Copy link
Owner

pxlrbt commented Apr 4, 2024

I don't really see the issue here. You say "Producer Model" but this is an error for "posts"? If your Model has a uuid column, then the query would be correct, right?

@C0d9Hunter
Copy link
Author

Sorry, on my project it's the Model Producer, I got the error on this project and thought I must have made a mistake, so I quickly created another laravel project with the Model Post.

Observation: when the primary key is ID the export goes fine, but when I change it to a uuid I get this error. It's as if the request expects to receive an integer (Id), but a string (UUID) is passed.

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