JavaPersistenceWithHibernate第二版笔记-第六章-Mapping inheritance-001Hibernate映射继承的方法
2016-04-07 20:34
501 查看
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.
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.
相关文章推荐
- Android APP开发需要的内容和优秀的开源网站
- object 类 “equals” 方法与 “ == " 之间的差别
- Unity3d 残影效果(狂拽炫酷叼炸天)
- 关于移动端开发宽度高度,字体以及rem宽度使用的总结
- iOS开发中一些常用的check事项2
- AndroidStudio插件GsonFormat
- ios开发中的一些注册流程的Check
- IOS开发基础知识--碎片36
- Android——适配器其他组件(AutoCompleteTextView:自动完成文本编辑框;Spinner:下拉列表)
- 个人偏好设置,归档,解档
- Android Fragment应用实战,使用碎片向ActivityGroup说再见
- Android客户端性能优化(魅族资深工程师毫无保留奉献)
- [iOS]关于横屏后状态栏不显示的问题
- Objective C类方法load和initialize的区别
- Android——网格视图 GridView
- android activity之间传递对象(Serializable 和 Parcelable)
- Android Studio导入Vitamio多媒体开发框架
- Android OpenGL ES 开发教程 从入门到精通
- Android开发文档翻译之-Services
- Android 设定横屏,禁止屏幕旋转,Activity重置