• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using Right outer Joins in Hibernate with My SQL.

 
Uthaya Prakash
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Buddies,

I'm trying to use Right outer join Query in Hibernate with MY SQL. Please let me know the Syntax for the same.
I already tried using as below and caught up with the Exceptions. Any quick help would be greatly appreciated. Thanks in Advance...

Query


Exception is
net.sf.hibernate.QueryException: outer or full join must be followed by path expression [select cd.* from com.nam.service.contract.ContractDetails cd right outer join com.nam.service.workassign.WorkStatus ws on ws.workStatusId = cd.workStatusId ]
 
Rahul Babbar
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok..two things..

1) do not use "On" clause while using Joins in HQL(because hibernate appends the clause itself by looking at the association between the mappings.
2) A Right Outer Join B is same as B Left Outer Join A, so in such a case use the Left Outer Join clause(because it is more frequently used and is more of a standard)

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic