敬的世界

常用链接

统计

最新评论

Hibernate Mapping Class Inheritance

SQL based models provide only has a relationships between entities. SQL database management systems dont support type inheritance -- and even when it's available, it's usually proprietary or incomplete

There are four different approaches to representing an class hieritance hierarchy:

   - Table per concrete class with implicit polymorphism -- Use no explicit inheritance mapping, and default runtime polymorphic behavior.

   - Table per concrete class -- Discard polymorphism and inheritance relationships completely from the SQL schema.

   - Table per class hierarchy -- Enable polymorphism by denormalizing the SQL schema, and utilize a type discriminator column that holds type information.

   - Table per subclass -- Represent is a(inheritance) relationships as has a (foreign key) relationships.

posted on 2008-11-01 15:17 picture talk 阅读(325) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航: