Hibernate has four different approach to represent an inheritance hierarchy.
- Table per concrete class with Implicit polymorphism : Use no explicit inheritance mapping and default runtime polymorphic behavior.
- Table per concrete class with unions : Discard polymorphism and inheritance relationship completely from the SQL schema
- Table per class hierarchy : Enable polymorphism by de-normalizing the SQL schema and utilizing a type discriminator column that holds that type information
- Table per subclass : Represent is a (inheritance) relationships as has a (foreign key) relationships.
No comments:
Post a Comment