David Kronhardt (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=6410855...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMzFmZTQ1YTY3...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16305?atlOrigin=eyJpIjoiMzFmZT...
) HHH-16305 (
https://hibernate.atlassian.net/browse/HHH-16305?atlOrigin=eyJpIjoiMzFmZT...
) A problem occurred in the SQL executor : JDBC parameter value not bound (
https://hibernate.atlassian.net/browse/HHH-16305?atlOrigin=eyJpIjoiMzFmZT...
)
Issue Type: Bug Affects Versions: 6.1.7, 6.2.0.CR3 Assignee: Unassigned Components:
hibernate-core Created: 14/Mar/2023 08:18 AM Priority: Major Reporter: David Kronhardt (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=6410855...
)
Using a parameter in select inside a function and in where clause results in an exception:
JDBC parameter value not bound
A similar issue was already reported and fixed. But it is still happening if the parameter
is itself a parameter of a function. Minimal Spring Boot project reproducing the problem:
https://github.com/dakr0013/hibernate-issue (
https://github.com/dakr0013/hibernate-issue
) , same example with hibernate 5.6.15 where it was working:
https://github.com/dakr0013/hibernate-issue/tree/old (
https://github.com/dakr0013/hibernate-issue/tree/old )
A small example query which causes the exception:
select DATEDIFF(e.date, :date) from SomeEntity e where :date < e.date
Those queries work fine:
select DATEDIFF(e.date, :date) from SomeEntity e
select :date from SomeEntity e where :date < e.date
Related issue:
https://hibernate.atlassian.net/browse/HHH-16137 (
https://hibernate.atlassian.net/browse/HHH-16137 )
(
https://hibernate.atlassian.net/browse/HHH-16305#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16305#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#100217- sha1:7167dc8 )