-->
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.  [ 2 posts ] 
Author Message
 Post subject: Criteria API doesn't handle table self-joins...
PostPosted: Wed Jun 11, 2008 11:26 am 
Newbie

Joined: Tue Nov 20, 2007 12:15 pm
Posts: 10
A major flaw of the Criteria query API is its inability to perform table self-joins, such as querying tables that implement, for example, nested sets.

Specifically, criteria queries cannot emit queries of form:
Code:
select ... from some_table t1 join some_table t2 ...


Assuming it is still the case that Criteria cannot do self-joins, and there are no workarounds that don't involve faking the self-join through a VIEW that performs the self-join -- I would like to add this functionality to Hibernate, because queries of this type appear throughout our app.

The Criterion query tree data structure captures the self-join fine so the loss of the self-joined alias appears to be happening in the CriteriaLoader phase.

Any devs familar with the source of the query generation engine able to provide some pointers or explain the self-join limitation?

cheers.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 12, 2008 8:58 am 
Newbie

Joined: Tue Nov 20, 2007 12:15 pm
Posts: 10
anyone?


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

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.