-->
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: Hibernate HQL and outer joins queries
PostPosted: Mon Mar 05, 2007 7:17 pm 
Newbie

Joined: Mon Aug 07, 2006 7:14 pm
Posts: 16
[b]Hibernate version:3.1[/b]
I'm also using Spring framework.

Hello all.
I need to build a HQL query that performs an outer join between two non associates entities.
I just want to reproduce the following sql query in HQL:
select table_a.id as col_0,
table_b.score_1-table_a.score_1 as col_1,
table_b.score_2-table_a.score_2 as col_2,
table_b.score_3-table_a.score_3 as col_3,
table_b.score_4-table_a.score_4 as col_4
from p_audit as table_a left join p_audit as table_b on (table_a.join_id=table_b.join_id and table_b.filter_id=6)
where table_a.filter_id=1058
order by 2

Table p_audit corresponds to the Pojo Audit...

Anybody know how could I perform this query? Is this possible in HQL?

Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 06, 2007 9:00 pm 
Beginner
Beginner

Joined: Tue Aug 30, 2005 2:33 am
Posts: 22
don't think so at present.
all the examples and text in doco ignores that fact.


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.