These are chat archives for hibernate/hibernate-orm

10th
Jul 2018
Giovanni Lovato
@heruan
Jul 10 13:21
@JWGmeligMeyling I'm sure there's a Jira for that, BTW if you add @MappedSuperclass to the parent embeddable it should work.
Jan-Willem Gmelig Meyling
@JWGmeligMeyling
Jul 10 14:27
Thanks, ill give it a try!
Somewhat makes sense I suppose? :/
Steve Ebersole
@sebersole
Jul 10 15:59
@JWGmeligMeyling not sure why you say "somewhat". it completely makes sense ;)
just to follow up, that is different than polymorphic support for embeddables (which is probably the Jira @heruan is thinking of)
aka discriminator-based inheritance support for embeddables
Steve Ebersole
@sebersole
Jul 10 16:07
ah, ok.. there is a Jira about the polymorphism
thanks for clarifying
Jan-Willem Gmelig Meyling
@JWGmeligMeyling
Jul 10 17:06
I found this issue in Jira, https://hibernate.atlassian.net/browse/ANN-467 , which was only answered with "wrong project" rather than "expected behaviour", which may have led to the confusion of Giovanni and me. Thanks for clearing this up! In my head @MappedSuperclass was always ment for Entity inheritance and it just seemed to make sense that Embeddables could extend each other, but clearly my intuition was wrong ;)
well, but @MappedSuperclass fits with JPA's overall inheritance strategy, no?
Jan-Willem Gmelig Meyling
@JWGmeligMeyling
Jul 10 17:14
Yes, in retrospect it does. But I would expect it on abstract types, which this my super embeddable is not.
Steve Ebersole
@sebersole
Jul 10 17:14
even for entities, @MappedSuperclass is perfectly valid on non-abstract classes in an entity hierarchy as well
anyway, i also created HHH-12790 today
Jan-Willem Gmelig Meyling
@JWGmeligMeyling
Jul 10 17:15
Embeddable polymorphism from HHH-1910 looks pretty interesting and indeed requires the distinction between these two types indeed
Steve Ebersole
@sebersole
Jul 10 17:15
so the super can use @Embeddable or @MappedSuperclass
but its not in keeping with JPA overall to just blindly pick up all attributes anywhere in that hierarchy
just in classes containing specific annotations
anyway, that's my belief
g2r
Jan-Willem Gmelig Meyling
@JWGmeligMeyling
Jul 10 17:19
I agree. Thanks for creating the issue!