setParameter(1,"param")
发生错误..还是应该好好看看api
setParameter
Query setParameter(int position, Object val) throws HibernateException
- Bind a value to a JDBC-style query parameter. The Hibernate type of the parameter is first detected via the usage/position in the query and if not sufficient secondly guessed from the class of the given object.
-
-
Parameters:
-
position
- the position of the parameter in the query string, numbered from 0. -
val
- the non-null parameter value
Throws:
-
HibernateException
- if no type could be determined
-