-->
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.  [ 2 posts ] 
Author Message
 Post subject: hibernate 3.1.3
PostPosted: Sun Oct 01, 2006 2:36 pm 
Newbie

Joined: Fri May 05, 2006 10:28 am
Posts: 3
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.1.3

i just upgraded to hibernate 3.1.3 from hibernate 2 and i have been getting this error

java.lang.IndexOutOfBoundsException: Remember that ordinal parameters are 1-based!

this is my query


public List getAllAreaOfInterestLabelValueBeans(long userId) {
String query = "SELECT new CoreLabelValueBean(aoi.aoiName, aoi.id) " + "FROM XrefUserRoleAoi as xura, AreaOfInterest as aoi " +
"WHERE aoi.id=xura.aoiId AND xura.userId = ? " +
"ORDER BY aoi.aoiName asc";
return getHibernateTemplate().find(query, new Object[] {new Long(userId)});
}

any thoughts
Fadi


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 01, 2006 5:47 pm 
Regular
Regular

Joined: Tue Sep 26, 2006 11:37 am
Posts: 115
Location: Sacramento, CA
You may want to try to explictly specify the join condition in a join clause instead of leaving it in the where clause. You can see the following for examples

http://www.hibernate.org/hib_docs/v3/re ... hql-select

-- excerpt ---
select new Family(mother, mate, offspr)
from DomesticCat as mother
join mother.mate as mate
left join mother.kittens as offspr


I hope this helps :)

Marius


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

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.