Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top