-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: JPA style positional params
PostPosted: Thu May 28, 2009 9:12 pm 
Newbie

Joined: Thu May 28, 2009 8:52 pm
Posts: 7
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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.