-->
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: is it possible to write Detached Criteria - Join with Query
PostPosted: Wed Mar 14, 2012 7:42 pm 
Newbie

Joined: Wed Mar 14, 2012 7:31 pm
Posts: 2
Hi
I'm new to Hibernate, and want to convert my SQL query to Hibernate query (Criteria/HQL/?):
Code:
select temp.a,temp.b,temp.c,mm.d
from main_table mm, (select count(x) as a, id as b, max(y) c
from main_table where z<100 group by id) temp
where mm.id=temp.id and mm.id not (select id from deleted_main)

Above is an example query in SQL, which I want to convert in Hibernate criteria mainly since as much I read we can't have a query in from clause in HQL.
Could someone please help me in structuring a DetachedCriteria query for above Sql?

TIA
Nitin


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.