Skip to:
In-Restrictions with a large number of elements lead to database sql errors (e.g. ORA-01795 in Oracle).
This issue came up on Hbernate 2 earlier (HB-655) but wasn't fixed for unknwon reasons.
The maximum IN list size in Oracle is 1000. Other DBs may also have similar limitations.
To work around these DB limits, large In-Restrictions in HQL/Criteria could be split into multiple In-Restrictions combined as disjunction:
x in (1,2,3,4...)
could be split into:
(x in (1,2,3,4,...)or (x in (1001,1002,1003,....)
Shoul also be done for composite-values: "(x, y) in ((1,1), (1,2), (1,3), ...)"
it's fixed by as I can see
In-Restrictions with a large number of elements lead to database sql errors (e.g. ORA-01795 in Oracle).
This issue came up on Hbernate 2 earlier (HB-655) but wasn't fixed for unknwon reasons.
The maximum IN list size in Oracle is 1000. Other DBs may also have similar limitations.
To work around these DB limits, large In-Restrictions in HQL/Criteria could be split into multiple In-Restrictions combined as disjunction:
x in (1,2,3,4...)
could be split into:
(x in (1,2,3,4,...)
or (x in (1001,1002,1003,....)
Shoul also be done for composite-values: "(x, y) in ((1,1), (1,2), (1,3), ...)"