Fabrice Daugan (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HHH-16137 (
https://hibernate.atlassian.net/browse/HHH-16137?atlOrigin=eyJpIjoiMGRlOG...
)
Re: Named parameter in SELECT and WHERE clauses throws JDBC parameter value not bound
error (
https://hibernate.atlassian.net/browse/HHH-16137?atlOrigin=eyJpIjoiMGRlOG...
)
The corresponding Java code of the queries:
// Works correctly
em.createQuery( "SELECT s FROM Simple s WHERE :ram < s.maxRam" )
.setParameter( "ram" , 2.0)
.getResultList();
// Works correctly
em.createQuery( "SELECT :ram FROM Simple s WHERE :ram2 < s.maxRam" )
.setParameter( "ram" , 2.0)
.setParameter( "ram2" , 2.0)
.getResultList();
// Throws the described exception
em.createQuery( "SELECT :ram FROM Simple s WHERE :ram < s.maxRam" )
.setParameter( "ram" , 2.0)
.getResultList();
(
https://hibernate.atlassian.net/browse/HHH-16137#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16137#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#100214- sha1:6115380 )