posted 15 years ago
So I'm trying to get a list of records from a table that meet a certain criteria and I'm having difficulty getting the Hibernate code correct. Here's what I have:
There's a table in my database named "Reviewer" which has a foreign key relationship with "ReviewerRole". There are obviously more fields in these objects, but these are really the only ones I care about. The Hibernate mapping seems to be working properly as when I do this:
I get a full list back and the ReviewerRole object is populated for every Reviewer.
What I want to do is essentially this:
I originally started with this:
When I try to run that, though, I get this error:
org.hibernate.QueryException: could not resolve property role.roleDescription of: ...Reviewer
Any thoughts? In looking at the documentation I can find, I'm not sure why this doesn't work, but the dereferencing of "role" doesn't seem to be working. Any advice is much appreciated.
Thanks,
Corey
[ June 11, 2008: Message edited by: Corey McGlone ]