Hi
I need to bind a named parameter in my HQL to a java object, what would be the type of the parameter in that case, would it be "Hibernate.OBJECT". So for example, my hql is:
"select user from User user where user.role = :myrole"
Now in the method call query.setParameter("myrole", a_role, Hibernate-type), what will the hibernate type be?
Another similar question is, say my hql is:
"select user from User user where user.role in (:myroles)"
Again for the call query.setParameter("myroles", a_roles, Hibernate-type), what will the hibernate type be? Here a_roles is a set(i.e. collection) of roles. For this particular case, I tried setting it to "Hibernate.OBJECT" but it doesnt seem to work.
Thanks so much.
Neha.
|