Burner (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=6423fd4...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYTMxMzI5NTY0...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16393?atlOrigin=eyJpIjoiYTMxMz...
) HHH-16393 (
https://hibernate.atlassian.net/browse/HHH-16393?atlOrigin=eyJpIjoiYTMxMz...
) Bug HHH-8697 seems to be alive in Spring Boot 3.0.4 with Hibernate 6.1.7 (
https://hibernate.atlassian.net/browse/HHH-16393?atlOrigin=eyJpIjoiYTMxMz...
)
Issue Type: Bug Affects Versions: 6.1.7 Assignee: Unassigned Components: query-hql
Created: 29/Mar/2023 02:05 AM Priority: Major Reporter: Burner (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=6423fd4...
)
Bug HHH-8697 (
https://hibernate.atlassian.net/browse/HHH-8697 ) Closed seems to be alive
in Spring Boot 3.0.4 with Hibernate 6.1.7
I wrote a very simple SQL in a JPA repo and I am wondering that it does not work:
@Query("SELECT a FROM #{#entityName} a WHERE ((:#{#iValue} IS NULL AND a.value IS
NULL) OR a.value = :#{#iValue})")
MyEntity findByValue(@Param("iValue") MyDataType value)
and get the error message:
Could not determine recommended JdbcType for org.example.MyDataType
I have now found out that it is based on the check with NULL and the value is not NULL.
That means the upper query works without the error message if value == null. If value !=
null , the above error message comes.
(
https://hibernate.atlassian.net/browse/HHH-16393#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16393#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100219- sha1:6a6077b )