• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Convert SQL to HQL

 
Chris Boldon
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How would I convert this query to HQL?



This is my mapping:
 
Scott Johnson
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Except for the table and column names, the SQL and HQL will look identical in this case.

See section 14.6 of the Hibernate manual.
[ November 02, 2006: Message edited by: Scott Johnson ]
 
William Eichele
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about that?


Greetings
Will
 
William Eichele
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
does nobody have an answer? please i need it for the work :>
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the question? I though Chris already had his answer?
 
William Eichele
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my problem is that i have to convert this sql query

into HQL. I don't need or want , to learn HQL in generally. So i asked if, someone could please help my with that.
 
William Eichele
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No one can convert your SQL to HQL without knowing what your mapped objects are called and how they are associated (hence, I'm guessing, the deafening silence).

This should explain how it works.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic