File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

need help with hibernate query

 
Naresh Chaurasia
Ranch Hand
Posts: 361
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Naresh Chaurasia
Ranch Hand
Posts: 361
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was able to solve the problem using following query:

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic