This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Convert to hibernate simple SQL statement

 
Alex Krasnikov
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone
Could you please help to convert tis sql statement to hibernate:
select * from table1 t1, table2 t2
where t1.id = t2.id;

thanks in advance
sorry for mistakes its my first topic here
 
Anantha Sharma
Ranch Hand
Posts: 43
Android Hibernate jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HQL: from Table1 t1, Table2 t2 where t1.id=t2.id

This can get much simpler if you could share the mapping files you used for these 2 tables..

remember, in HQL you cannot use the table name, you can only use the POJO name (which is mapped)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic