Using hibernate 3.3.1.
Sorry this may be a repeated question, but after searching for various posts and trying out a few things, I am a bit confused.
This old bug fix
http://opensource.atlassian.com/projects/hibernate/browse/EJB-6 made me believe that ?1 and ?2 style of params will work with core hibernate as well as in JPA. (Since JPQL is subset of HQL)
query.setParameter("1", foo) - works
query.setParameter(1, foo) - fails (java.lang.IndexOutOfBoundsException: Remember that ordinal parameters are 1-based!
)
Can someone please confirm if this is how it is or I am making some mistake?