The following hql query worked for me in 3.1.3:
Code:
from User u where u.account = :account
where both User and Account are Hibernate mapped classes.
I.e using a mapped class in the where clause, and binding with an instance.
when trying with 3.2.6, I get the following exception:
Code:
Caused by: java.sql.SQLException: No value specified for parameter 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1718)
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1666)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1377)
at com.caucho.sql.UserPreparedStatement.executeQuery(UserPreparedStatement.java:89)
at com.caucho.sql.UserPreparedStatement.executeQuery(UserPreparedStatement.java:89)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
at org.hibernate.loader.Loader.doQuery(Loader.java:674)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2213)
I am not able to find any reference to this type of where clause syntax in the online doc, could it be that it was never supported, but happened to work in 3.1? I can't find anything in the 3.2 release docs that seems related though.
I am using MySql 5.0.22
Any help is appreciated,
/ Christian