Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Data fetch from multiple SQL tables

 
mallika arora
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am in the process of writing my first hibernate application. I have a sql query that fetches data from multiple tables using left and right outer joins. I need to convert this JDBC data access code into Hibernate code. The tables in SQL are not related using foreign keys.

I have created hibernate mapping for each table, datasource configuration xml and POJO for each table. I am unable to follow how to use HQL createQuery that would use table classes to retrieve data from 8 or 9 tables.

Any example of HQL fetching data from multiple tables would be a help.

Please advice.

Thanks,
Mallika
 
Aniket S. Kulkarni
Ranch Hand
Posts: 87
Android Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Mark Spritzler: Sir, These are not valid links. Please provide new valid links. Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic