I am trying to implement this JPA model:
- Class
Owner
is anEntity
. It has@Embedded
instance of classAbstractParent
. - Class
AbstractParent
is@Embeddable
. It is an abstract class, and this class has two children.The children are concrete classes.
The exception is: Cannot instantiate abstract class or interface: AbstractParent
It seems that (1) I need component inheritance, but (2) component inheritance is not allowed in JPA and (3) it was not implemented in Hibernate. Could you confirm that (1), (2) and (3) are correct? If they are correct could you provide any advice or workaround? I use hibernate-jpa 2.0, hibernate-core 3.5.1, hibernate-core-annotations 3.2.0