-->
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: Query.SetParameterList
PostPosted: Mon May 15, 2006 7:47 am 
Newbie

Joined: Tue Jan 24, 2006 12:04 pm
Posts: 12
i have a problem about Hibernate List, if the list has over 300 items, then it will throw a "too complicated SQL" exception.

I have to render it myself (divide list to parts), is there any existing way in hibernate to overcome this problem?


Last edited by kaisor on Tue May 16, 2006 4:02 am, edited 4 times in total.

Top
 Profile  
 
 Post subject: Need more info
PostPosted: Mon May 15, 2006 12:54 pm 
Senior
Senior

Joined: Wed Aug 17, 2005 12:56 pm
Posts: 136
Location: Erie, PA (USA)
Multiple uses of .setParameterList for a query works fine for me (v3.1.3 on DB2/400). We need more information: version, db, mappings, etc.

_________________
---- Don't forget to rate! ----


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 16, 2006 3:33 am 
Newbie

Joined: Tue Jan 24, 2006 12:04 pm
Posts: 12
i put another problem in the first post.

the elder one is solved, that was my fault : an unnecessary ")" in query.


Top
 Profile  
 
 Post subject: Is it possible to attach two setParameterList of the same le
PostPosted: Thu Jun 18, 2009 6:59 pm 
Regular
Regular

Joined: Tue Feb 19, 2008 6:05 pm
Posts: 82
Code:
from
table
where table.tableId in (select distinct otherTable.otherTableField where table.tableId = otherTable,tableId
and otherTable.tableColumn in (:tableColumn))
and table.someTableColumn in (:someTableColumn)
.setParameterList(tableColumn, someArray[5])
.setParameterList(someTableColumn, someOtherArray[5])


This is possible to attach two setParameterList of the same length, but is there a way to re-write these queries where in you know that you want to pass a single parameter from the two arrays/list for the two variables. i.e.,

if

Code:
String[] array1 = new String[]{"abc","cde","def"};
String[] array2 = new String[]{"123","234","345"};

I want to pass array1[0]="abc" along with array2[0]="123" at the same time and so on, and get the results.


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.