gaur wrote:
As far as I know Oracle support maximum of 1000 values in the static in clause.
What DB are you using ? Can you post the exception that you are getting ?
I'm working over Oracle 10g, and it's can execute with a lot of keys, I tested it, the restriction is in Hibernate.
I can add more than 1000 keys with a query:
sql = "select * from employees where employee_key in (select * from table(cast(:parameterName as NUMBERTABLE)))"
list = getSession().createSQLQuery(sql)
.setParameter("parameterName", keys, Hibernate.custom(NumberTableType.class))
.list()
* public class NumberTableType implements UserType, LiteralType{ ...
* NUMBERTABLE is a new Type into Data Base (Oracle)
But, I need to implement something like that with Criteria :(
Thanks ...