Skip to main content

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

Thanks for the replies.

Subselect is a possibility.  However chunking did the trick.

Sri

-----Original Message-----
From: eclipselink-users-bounces@xxxxxxxxxxx [mailto:eclipselink-users-bounces@xxxxxxxxxxx] On Behalf Of Tom Ware
Sent: Friday, September 24, 2010 7:58 AM
To: EclipseLink User Discussions
Subject: Re: [eclipselink-users] Query hitting in-clause limit

Hi Sri,

   Can the regIdList be built in a subselect?  Will the DB handle that?

   If the subselect does not help, I recommend you go with the obvious workaround and cut the query into chunks yourself.

   Please feel free to enter and enhancement request.  If there is enough community demand for a feature we will consider it.

-Tom

Sri Sankaran wrote:
> 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
>  
> 
> 
> ----------------------------------------------------------------------
> --
> 
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



Back to the top