[hibernate-dev] @MappedSuperclass, @Embeddable and consistency

Steve Ebersole steve at hibernate.org
Mon May 12 17:10:06 EDT 2014


The JPA spec is completely silent on inheritance when it comes to
embeddable classes.  When Emmanuel was first developing
hibernate-annotations we decided to allow the use of @MappedSuperclass to
be extended to embeddable classes to control the persistence of attributes
when an embeddable had a superclass.

I want to make sure we are all supporting this consistently.  And if not,
whether we need to revisit that original decision.

For example, Gail has recently found inconsistencies in regards to how
envers handles @MappedSuperclass + @Embeddable, compared to ORM.
 Specificaly it has different expectations for audited attributes for
@MappedSuperclass when it comes to @Entity versus @Embeddable.

Adam/Lukasz. do you guys see that as a conscious decision?  If so, can you
validate why y'all decided to go that way?  If it was not a conscious
decision, are there major technical/implementation hurdles to overcome in
making this consistent?

In Search, OGM, etc are we consistent with this interpretation of
@MappedSuperclass + @Embeddable?


More information about the hibernate-dev mailing list