We're updating the issue view to help you get more done. 

Cannot put more than 1000 elements in a InExpression

Description

The number of elements that we can put in a "in" expression is limited to a certain amount (1000 for Oracle, for instance). When creating a criteria query, the org.hibernate.criterion.InExpression class should split the expression into several smaller ones.

Attached is a patch which splits the expression by slices of 500 elements. For example, if we have 1001 elements to put in the "in" expression, the result would be :
(entity.field in (?, ?, ?...) or entity.field in (?, ?, ?...) or entity.field in )

The surrounding parantheses are useful to avoid problems with other conditions (a "and" condition taking over the one of the "or" conditions).

Environment

Oracle 9i

Status

Assignee

Steve Ebersole

Reporter

Alexis Seigneurin

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

3.2.0.alpha1
3.1 rc2

Priority

Major