Kos*_*sta 5 java inheritance jpa abstract embeddable
我正在尝试实现这个 JPA 模型:
Owner是一个Entity. 它有@Embedded类的实例AbstractParent。AbstractParent是@Embeddable. 它是一个抽象类,该类有两个子类。子类是具体类。例外的是:Cannot instantiate abstract class or interface: AbstractParent
看起来(1)我需要组件继承,但是(2)JPA 中不允许组件继承,(3)Hibernate 中没有实现它。你能确认(1)、(2)和(3)是正确的吗?如果他们是正确的,您能提供任何建议或解决方法吗?我使用 hibernate-jpa 2.0、hibernate-core 3.5.1、hibernate-core-annotations 3.2.0
| 归档时间: |
|
| 查看次数: |
4773 次 |
| 最近记录: |