aspose file tools*
The moose likes Object Relational Mapping and the fly likes Usage of inheritance in 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 "Usage of inheritance in hibernate" Watch "Usage of inheritance in hibernate" New topic
Author

Usage of inheritance in hibernate

Rithanya Laxmi
Ranch Hand

Joined: Jan 24, 2011
Posts: 140
Hi,

When to use the hibernate inheritance table per class, subclass and concreate class? I havent seen it is beern used in any of my previous hibernate projects. Hence please clarify.

Thanks.
Emanuel Kadziela
Ranch Hand

Joined: Mar 24, 2005
Posts: 186
Why don't you read this hibernate documentation on inheritance and the various strategies first, and then ask more specific questions if you don't understand the finer details.
Rithanya Laxmi
Ranch Hand

Joined: Jan 24, 2011
Posts: 140
Thanks. I know about hibernate inheritance, but I don't know at what situation we need to use inheritance and which one of them? Please clarify.
Emanuel Kadziela
Ranch Hand

Joined: Mar 24, 2005
Posts: 186
A Google search of "choosing the right hibernate inheritance strategy" yields this result in around 10th place: http://what-when-how.com/hibernate/inheritance-and-custom-types-hibernate/, an article with a great wealth of information on pros and cons of each strategy, details on their implementations and configurations, and other related advice and information.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Usage of inheritance in hibernate