On 18 Jan 2014, at 04:28, Steve Ebersole <steve(a)hibernate.org> wrote:
At the moment all of metamodel binding completely mis-handles
MappedSuperclasses. The annotation source processor handles them somewhat,
but in a very unusable way; it basically flattens all MappedSuperclass info
into the nearest Entity. This is because the source package does not at
all support the definition of MappedSuperclass. And then of course
bindings do nothing with it, since it is not accounted for in source.
To add this support I plan on the following changes:
1) Move lots of the information currently defined by RootEntitySource into
EntityHierarchy. The identifier, version, etc is actually a function of
the hierarchy as a whole, so conceptually it makes more sense there anyway.
And that mirrors the way we modeled it in the binding spi.
2) Generalize the EntityHierarchy tree to allow mixing Entity and
MappedSuperclass sources. A MappedSuperclass source actually needs to be
3) Model MappedSuperclass in the binding spi as well.
+1 especially for #3. The reason the annotations side did this flattening was as you say
the fact that there was no source equivalent. I think we might have discussed this
once, but affair back then we decided there was no special need to reflecting mapped
super class in the source level.