This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Hibernate: Path expected for Join! exception for inner join Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate: Path expected for Join! exception for inner join" Watch "Hibernate: Path expected for Join! exception for inner join" New topic
Author

Hibernate: Path expected for Join! exception for inner join

vikas sharmaa
Ranch Hand

Joined: Jun 28, 2007
Posts: 191
There is one-to-one mapping between Game and Team tables.

I am getting "Path expected for Join!" exception on executing below inner join HQL query:



Please find below the mapping files:

Team.hbm.xml


Game.hbm.xml


Team.java


Game.java
vikas sharmaa
Ranch Hand

Joined: Jun 28, 2007
Posts: 191
ok i got it. the correct query is

session.createQuery("from Team t join t.game gm");
 
wood burning stoves
 
subject: Hibernate: Path expected for Join! exception for inner join
 
Similar Threads
Mapping Exception
Error: "Could not synchronize database state with session"
One to many Relation
Problem in mapping
Hibernate Newbie - 1 to Many Relation Tutorial