A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Object Relational Mapping
Hibernate SELF LEFT OUTER JOIN
Joined: Dec 04, 2007
Mar 19, 2010 00:05:48
I am trying to use self left outer join using SQLQuery, but it dosnt work, any idea on this...
String strQuery = "select j1.job_item_id, j2.job_item_id, j1.job_id, j2.job_id from tt_job_item as j1 " + "left join tt_job_item as j2 on j1.locked_item = j2.locked_item and j1.job_id = 1 " + "and j2.job_id != 1 and j1.job_item_status = 'RUNNING'"; SQLQuery sqlQuery = session.createSQLQuery(strQuery);
However the same query works fine when run through
Any idea whay?
Hope to get response soon,<br />Thanks,<br />Prem.
Joined: Jul 29, 2008
Mar 19, 2010 01:16:25
"Prem Java", please check your
regarding an important administrative matter.
Author of ExamLab
- a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like?
How to Ask a Question
I agree. Here's the link:
subject: Hibernate SELF LEFT OUTER JOIN
regarding sql query
join() method; guarenteed behaviour
HQL Self Left Outer Join
Inserting single column values of database table into multiple columns of jtable and do comparison
puzzle - water jar
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014