This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
No idea. I'd be surprised if Hibernate imposed a limit. Indeed, you can bind a List of values to a query, so the number possible is probably very large.
The driver and database may impose a limit. Under most database you are going to hit a query size problem at some stage or other. Oracle for example used to have a limit of 64Kb per query. That was back in Oracle 9 days, so I'm not sure if it has move on by now.
That being said a 64Kb query is a pretty huge query. So general good software practice rules probably apply: if you find yourself writing code that is hitting the maximum space allowed, stop and have a rethink.
Joined: Apr 18, 2008
Thanks for the reply.
I am passing the entire list in the query. But the size of the list vary from 1 to 5000 . so when i say from ABC where xyz in (List) . It works fine for limited size.but for bigger size it didnt work.
As a means to query for results where a condition belongs in a set? No. This is true of both SQL as well as HQL. There are different ways of writing queries, but if your query is failing because your are hitting a limit on the size of the SQL itself, and that limit is being hit because of the number of values you have to put in your conditional clause then however you write it you are probably going to have the same problem.
Are you using bind variables?
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com