aspose file tools*
The moose likes Object Relational Mapping and the fly likes One java class & Two tables Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "One java class & Two tables Hibernate" Watch "One java class & Two tables Hibernate" New topic
Author

One java class & Two tables Hibernate

vibhu garg
Greenhorn

Joined: Dec 28, 2005
Posts: 4
Is it possible in Hibernate to Map one Java to Two different tables in Database?
Scott Johnson
Ranch Hand

Joined: Aug 24, 2005
Posts: 518
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.
 
Don't get me started about those stupid light bulbs.
 
subject: One java class & Two tables Hibernate