Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Object Relational Mapping and the fly likes How to avoid cross join from hibernate generated sql Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "How to avoid cross join from hibernate generated sql" Watch "How to avoid cross join from hibernate generated sql" New topic
Author

How to avoid cross join from hibernate generated sql

Robo Fazak
Greenhorn

Joined: Mar 25, 2010
Posts: 8
Hi,


I am trying to execute a HQL query



Hibernate generates the following query



that causes the error in oracle : ORA-25156: old style outer join (+) cannot be used with ANSI joins

Please suggest a solution for this. I don't know why hibernate generates a cross join automatically.








SCJP 1.6
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1282

There is more than one Oracle Dialect are you using the correct one?
http://docs.jboss.org/hibernate/orm/3.5/api/org/hibernate/dialect/package-summary.html

Are you using the correct JDBC driver for Oracle? What version of Oracle and Hibernate are you using?


[How To Ask Questions][Read before you PM me]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How to avoid cross join from hibernate generated sql
 
Similar Threads
@ManyToMany and Select query
Problem with Hibernate Criteria, Projections and associations
Going crazy.. can't join on this compound key class and not sure why?
eager fetching of lazy formulas via criteria api
EJB QL w/ ManyToMany