Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

One java class & Two tables Hibernate

 
vibhu garg
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible in Hibernate to Map one Java to Two different tables in Database?
 
Scott Johnson
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Hibernate reference manual describes how to map a single java class to two different tables by using the entity name property to differentiate between the two entities.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic