Fixed
Details
Assignee
Christian BeikovChristian BeikovReporter
Ken ChanKen ChanComponents
Fix versions
Priority
Major
Details
Details
Assignee
Christian Beikov
Christian BeikovReporter
Ken Chan
Ken ChanComponents
Fix versions
Priority
Created December 12, 2018 at 11:12 AM
Updated March 2, 2022 at 10:30 AM
Resolved January 6, 2022 at 12:00 PM
Encounter the same problem in 5.3.7 which are described at :
https://hibernate.atlassian.net/browse/JPA-31
https://hibernate.atlassian.net/browse/HHH-9165
Refer to the test-case at https://github.com/hibernate/hibernate-orm/commit/c354b5e8b9e157d46c08d3070de5d654e4e6cf11. Changing to use the native SQL
select * from Event where (:name is null or name = :name)
Then set the parameter to null
query.setParameter( "name", null )
It will then thrown :
Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = bytea Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Change to use Hibernate specific API does not have such problem.