This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Problem with reading field in Hibernate 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 "Problem with reading field in Hibernate" Watch "Problem with reading field in Hibernate" New topic
Author

Problem with reading field in Hibernate

jeff wisgo
Greenhorn

Joined: Apr 20, 2004
Posts: 15
I am trying to do a simple query in HQL but I cannot figure out what is the cause of this error message. My flow is PowerDesigner->Generate SQL->Middle Gen->HBM2Java.

The error message I am getting looks like this:



Here are the relevant .hbm.xml files




My main confusion here is why the error says cannot find property 'title' of 'Videosessionmediamapping', where my query states 'vs.videosessionmediamappings. media.title'. I would expect it to associate 'title' with 'media' instead.

Another interesting thing I found is this query works:



Which leads me to believe there is a problem with the association between Videosessionmediamapping and Videosession.

Sorry for the long post, I tried to only give the mimimum information.
jeff wisgo
Greenhorn

Joined: Apr 20, 2004
Posts: 15
I just realized the exception came out on a single line. Here is a version of it which is easier to read:

 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Problem with reading field in Hibernate
 
Similar Threads
How to map column to a property ?
Many-To-Many problem in Hibernate 3.0 beta 1
Integrity constraint violation: for Hibernate Insert
Ternary and composite ID
How to solve Repeated column in mapping for entity: