This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate select columns from multiple tables  RSS feed

 
jaya lakshmi
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I am using hibernate and Eclipse. Please anybody help me how do i get columns from multiple tables. What mapping do i need to write.

Pls help me

Jaya
 
Sathya Srinivasan
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on how the tables are related. Hibernate has many relational mappings - one-to-one, one-to-many, many-to-many, etc.

Depending on the relationship, you should map the tables accordingly. There are some good examples in the Hibernate documentation available in the official website.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!