File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HQL query with OneToMany

 
Kamil Kuchta
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have problem to create some HQL query.
This is my object model. Hotel has list of Image.


Standard SQL in this case is easy:

But how to create HQL?
 
Vijitha Kumara
Bartender
Posts: 3908
9
Chrome Fedora Hibernate
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Isn't the relationship bi-directional? You have to reference Hotel from the Image as Many side of One-To-Many will be the owner of the relationship. HQL is bit different form SQL. Are you trying to execute a native SQL or HQL?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic