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, same example with hibernate 5.6.15 where it was working: 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 |