• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Data fetch from multiple SQL tables

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 87
Android Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Mark Spritzler: Sir, These are not valid links. Please provide new valid links. Thanks!
 
I wasn't selected to go to mars. This tiny ad got in ahead of me:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic