Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Query hitting in-clause limit

Using Eclipselink 2.0 against Oracle 11g database
 
I have a query that is resulting in an ORA-01795 error.  This means that the in-clause has more than 1000 values. 
 
The logic in Java that triggers this result goes something like this:
 
List<Long> regIdList = A large list of IDs
Query q = entityManager.createQuery(“Select r from Registration r where r.registrationId in :regIds”);
q.setParameter(“regIds”, regIdList);
List<Registration> results = q.getResultList();
 
I have a business need to be able to pull all that data.
 
What is the recommended recourse?  I really like Eclipselink’s ability to consume a list to construct the appropriate in-clause.  It would be nice if Eclipselink could recognize that the size of the list exceeds Oracle’s limit and then chunks it appropriately. 
 
Wishful thinking? J
 
Sri
 

Back to the top