Inheritance in Hibernate OGM

时光毁灭记忆、已成空白 提交于 2019-12-13 07:15:12

问题


How you can handle the inheritance mechanism in Hibernate OGM, in particular using MongoDB? In "Hibernate OGM Reference" I read that the inheritance mechanism is not supported by OGM. So there is a way to avoid the problem? Thanks


回答1:


The documentation is misleading, inheritance is supported except for javax.persistence.InheritanceType#JOINED.

This means that if your model is using javax.persistence.InheritanceType#SINGLE_TABLE or javax.persistence.InheritanceType#TABLE_PER_CLASS.

You should be fine.



来源:https://stackoverflow.com/questions/39933232/inheritance-in-hibernate-ogm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!