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

PostgreSQLCIText not implementing BindableType #714

Closed
flozano opened this issue Apr 17, 2024 · 4 comments
Closed

PostgreSQLCIText not implementing BindableType #714

flozano opened this issue Apr 17, 2024 · 4 comments

Comments

@flozano
Copy link

flozano commented Apr 17, 2024

When using Hibernate 5, I used to use

 nativeQuery.setParameter(4, value, PostgreSQLCITextType.INSTANCE); 

this is not possible anymore in Hibernate 6, as PostgreSQLCITextType does not implement BindableType. I am not sure if this is intended or a consequence of it being a ImmutableType (as all the types that inherit from MutableType are BindableType's) ... and what would be the right approach to use the PostgreSQLCITextType in this case.

@vladmihalcea
Copy link
Owner

@flozano To get that, you will have to change the PostgreSQLCITextType so that instead of extending ImmutableType, it will extend the DescriptorImmutableType. Looking forward to your Pull Request that fixes the issue.

@flozano
Copy link
Author

flozano commented Apr 18, 2024

thanks @vladmihalcea for the hint, I was trying to create a wrapper for PostgreSQLCITextType instead but your suggestion looks better.

@flozano
Copy link
Author

flozano commented Apr 18, 2024

Actually it was easier for me to change the code slightly to use citext_eq in the SQL, as this is a native query. I may attempt to contribute the PR later anyway :)

@vladmihalcea
Copy link
Owner

Closed as no PR was provided.

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

No branches or pull requests

2 participants