-->
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: New to hibernate criteria!!
PostPosted: Fri Jan 20, 2012 5:05 am 
Newbie

Joined: Fri Jan 20, 2012 2:51 am
Posts: 1
Hi;

Am priya..dot net developer but my new project happened to be in hibernate java..hibernate seems to be interesting but kinda difficult to get used to it..i need Ur help..

i have a query joining two different tables without any mapping association.i really wonder how i can put the query in using hibernate criteria projections..

My query :
select top 1 e.code from
(select wcp.cz_code as code ,SUM(dl.net_amount_amount) as Total_amount from detail dl
inner join
paycode wcp on (dl.long_or_short_code = wcp.name )
where dl.header_id =8 and wcp.tree_position like 'long%'
group by wcp.cz_code )as E

order by E.Total_amount desc

please help me with this.

Thanks,
Priya


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.