Unify entity and any discriminator handling
Description
Activity
Show:
Steve Ebersole March 27, 2023 at 6:25 PM
This is done as much as currently possible as a grouping of work. I’ll do some more work on this under and a lot more opportunity opens up as we work through the changes to building the metamodel
At the moment, Hibernate is using a mix of new and legacy descriptors for mapping entity discriminators. The legacy contracts include:
org.hibernate.persister.entity.DiscriminatorMetadata
org.hibernate.persister.entity.DiscriminatorType
org.hibernate.type.MetaType
The corresponding new runtime mapping contract is:
org.hibernate.metamodel.mapping.EntityDiscriminatorMapping
org.hibernate.metamodel.mapping.internal.AnyDiscriminatorPart
Much of the consolidation happens through the shared converter -
org.hibernate.metamodel.mapping.DiscriminatorConverter