Pergunta

Is it possible for Embeddables to inherit Basic , Transient , OneToOne etc attributes from MappedSuperClass ?

Foi útil?

Solução

No. A MappedSuperClass designates a class whose mapping information is applied to the entities that inherit from it. Embeddables are not entities.

Also, The JPA specification does not define inheritance for Embeddable objects

The EclipseLink JPA implementation does support inheritance for embeddables (see here for details). Of course, using this functionality is not be portable across JPA implementations.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top