aspose file tools*
The moose likes Object Relational Mapping and the fly likes HQL query required with left outer join Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "HQL query required with left outer join" Watch "HQL query required with left outer join" New topic
Author

HQL query required with left outer join

umair naqvi
Greenhorn

Joined: Nov 08, 2008
Posts: 2
I have two tables namely deliverydetails and supplybilldetails with following SQL create statements





Their respective classes are

getters and setters are omitted……..


getters and setters are omitted……..


Tables are connected with supplybilldetail.id  deliverydetails.billdetailid

Problem is that I need to find the HQL query for the group sum of deliverydetails.qty on deliverydetails.billdetailid but I simply can’t. Following query works



I want to add something like
“ where s.qty > sum(d.qty) group by s.id “ can somebody help me out???
Ninad Kulkarni
Ranch Hand

Joined: Aug 31, 2007
Posts: 797

UseCodeTags


SCJP 5.0 - JavaRanch FAQ - Java Beginners FAQ - SCJP FAQ - SCJP Mock Tests - Tutorial - JavaSE7 - JavaEE6 -Generics FAQ - JLS - JVM Spec - Java FAQs - Smart Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HQL query required with left outer join