JavaPersistenceWithHibernate第二版笔记-第六章-Mapping inheritance-001Hibernate映射继承的方法

There are four different strategies for representing an inheritance hierarchy:
 Use one table per concrete class and default runtime polymorphic behavior.
 Use one table per concrete class but discard polymorphism and inheritance relationships completely from the SQL schema. Use SQL UNION queries for runtime polymorphic behavior.

 Use one table per class hierarchy: enable polymorphism by denormalizing the SQL schema and relying on row-based discrimination to determine super/subtypes.
 Use one table per subclass: represent is a (inheritance) relationships as has a (foreign key) relationships, and use SQL JOIN operations.

posted @ 2016-04-07 20:34  shamgod  阅读(148)  评论(0编辑  收藏  举报
haha