my dog learned polymorphism*
The moose likes Object Relational Mapping and the fly likes HQL Self Left Outer Join Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "HQL Self Left Outer Join" Watch "HQL Self Left Outer Join" New topic
Author

HQL Self Left Outer Join

Prem Kash
Greenhorn

Joined: Dec 04, 2007
Posts: 5
I want to have a self Left outer join on the table using HQL(Hibernate Query language), can anybody please help...

Here are the classes




And I wanyt to implement the following query using HQL or Criteria Query, can anybody please help.

select j1.job_item_id, j2.job_item_id, j1.job_item_status,j2.job_item_status from tt_job_item as j1 left join tt_job_item as j2 on j1.locked_item = j2.locked_item


Hope to get response soon,<br />Thanks,<br />Prem.
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3013
    
  35

Please UseCodeTags


Founder of ExamLab and Systemup
See how I can help you to become an awesome programmer
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HQL Self Left Outer Join
 
Similar Threads
Hibernate SELF LEFT OUTER JOIN
Problems using GenerationType.IDENTITY for in-memory databases
problem with using idbags in Hibernate, which gives persistenceException etc. Help please. Thanks!
JPA - need help with query
Can a class be mapped to a table and be Embeddable at the same time?