File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mapping two tables to one persistent class in hibernate

 
Raj Kumar Bindal
Ranch Hand
Posts: 418
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can we map two tables with one persistent class in hibernate?

If yes, please let me know how can we do that.
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Something like this:


You end up with a class mapped like this:



Here's a little tutorial on the topic:

Mapping One Class to Two Tables

-Cameron McKenzie

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic