This week's book giveaway is in the JavaScript forum.
We're giving away four copies of JavaScript Promises Essentials and have Rami Sarieddine on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes need help with hibernate query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "need help with hibernate query" Watch "need help with hibernate query" New topic
Author

need help with hibernate query

Naresh Chaurasia
Ranch Hand

Joined: May 18, 2005
Posts: 356
I have following entities.



i.e. there is many(Guitar) to one(GuitarSpec) relation. I am fetching a row from GuitarSpec(these rows are unique). Now i want to fetch rows from Guitar(Column specification_id references the specId from GuitarSpec).

I am trying the following but it does not work.



I am able to fetch GuitarSpec , but not able to fetch Guitar. How can i fetch Guitar.

Thanks.

SCJP 1.4, SCWCD1.4, OCA(1Z0-007)
Naresh Chaurasia
Ranch Hand

Joined: May 18, 2005
Posts: 356
I was able to solve the problem using following query:

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: need help with hibernate query