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

Writing UUID into PostgreSQL results in error #824

Closed
nlochschmidt opened this Issue Sep 30, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@nlochschmidt
Copy link

nlochschmidt commented Sep 30, 2018

When I try to save an entity with a java.util.UUID field into a Postgres column of type UUID I get an error:

org.postgresql.util.PSQLException Caused by: : ERROR: column "id" is of type uuid but expression is of type bytea

When stepping through the relevant parts of requery in the debugger, I can see that the platform is correctly detected and the UUID type is registered in https://github.com/requery/requery/blob/1.5.1/requery/src/main/java/io/requery/sql/platform/PostgresSQL.java#L86. However while binding the parameters, the UUIDConverter gets invoked and the UUID is converted into a byte array: https://github.com/requery/requery/blob/1.5.1/requery/src/main/java/io/requery/converter/UUIDConverter.java#L45. The platform-specific UUIDType is then not invoked at all. Do I need to configure something to make this work correctly?

I am only using a Postgres database, so can I maybe somehow disable the UUIDConverter completely?

I am using requery 1.5.1 and Postgres 10.4.

@npurushe npurushe self-assigned this Oct 2, 2018

hc-codersatlas added a commit to hc-codersatlas/requery that referenced this issue Jan 24, 2019

Fix for requery#824
UUID bug fix for postgresql

hc-codersatlas added a commit to hc-codersatlas/requery that referenced this issue Jan 24, 2019

Revert "Fix for requery#824"
This reverts commit 31ba727.

@npurushe npurushe closed this in 762d556 Jan 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment