-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: HQL : Hierarchy select solution
PostPosted: Tue Jun 21, 2011 12:26 pm 
Newbie

Joined: Tue Jun 21, 2011 12:12 pm
Posts: 1
As well known we can't use starts with / connect by in HQL.
However I have to use HQL and not native therefore I came with a solution of :
1. fetching my hierarchy data into an id list.
2. Concatenating the id list into "IN" clause in my HQL query.

It work fine obviously, until my id list became larger then 2,000 id's. (oracle parameter count limitation)
The hierarchy fetch is an organization query in a large organization.

The only solution I could think of is to divide my id list to sub queries of lets say 1,000 id's and then unifying my results.

Has anyone encountered with a similar problem ?

thanks,
Ariel.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.