-->
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.  [ 4 posts ] 
Author Message
 Post subject: strange things about named parameters
PostPosted: Tue Oct 28, 2003 3:11 pm 
Expert
Expert

Joined: Tue Sep 16, 2003 4:06 pm
Posts: 318
Location: St. Petersburg, Russia
queryText.append(
"( " +
" select count(skill.id) " +
" from emp.skills skill " +
" where skill.id in (:skillList) " +
") = :skillListSize and " );
...

query = session.createQuery(queryText.toString());

...

query.setInteger("skillListSize", skillIds.length);
query.setParameterList("skillList", skillIds);

And this fails: Named parameter does not appear in Query: skillListSize

"... and ( select count(skill.id) from emp.skills skill where skill.id in (:skillList0_) ) = :skillList0_Size and ..."

Where these 0_ come from? If I rename skillListSize to just listSize, everything works fine


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 28, 2003 6:16 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
hehe uggghhh :(

let me at that parser!

just try using :size instead of :skillListSize


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 28, 2003 6:20 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
http://opensource.atlassian.com/project ... key=HB-430


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 28, 2003 6:21 pm 
Expert
Expert

Joined: Tue Sep 16, 2003 4:06 pm
Posts: 318
Location: St. Petersburg, Russia
Yes, as I already wrote, if I use ":listSize" instead of ":skillListSize" everything works. But why this happens?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.