Trying to upgrade a project from Hibernate 5 to 6 I run into the following issue:
The rough arrangement looks like this (pseudocode):
org.hibernate.cfg.ClassPropertyHolder.addPropertyToMappedSuperclass(Property, XClass) runs into a special branch of the code if the mapped superclass has generic parameters. In that case, it ultimately ends up calling setTypeName(…) with the type name of the embeddable as parameter. ComponentType later inspects that type name and tries to resolve it in its constructor, unconditionally casting it to CompositeUserType. Find a reproducer here.
Hope that helps further diagnosing the problem. |