File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed
hibernate-core/src/main/java/org/hibernate/metamodel/internal Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -575,15 +575,24 @@ private Property getMappedSuperclassIdentifier(PersistentClass persistentClass)
575575 return null ;
576576 }
577577
578- private EmbeddableTypeImpl <?> applyIdClassMetadata (Component idClassComponent ) {
579- final JavaTypeRegistry registry = getTypeConfiguration ()
580- .getJavaTypeRegistry ();
581- final Class <?> componentClass = idClassComponent .getComponentClass ();
582- final JavaType <?> javaType = registry .resolveManagedTypeDescriptor ( componentClass );
578+ private <Y > EmbeddableTypeImpl <Y > applyIdClassMetadata (Component idClassComponent ) {
579+ final JavaType <Y > javaType =
580+ getTypeConfiguration ().getJavaTypeRegistry ()
581+ .resolveManagedTypeDescriptor ( idClassComponent .getComponentClass () );
582+
583+ final MappedSuperclass mappedSuperclass = idClassComponent .getMappedSuperclass ();
584+ final MappedSuperclassDomainType <? super Y > superType ;
585+ if ( mappedSuperclass != null ) {
586+ //noinspection unchecked
587+ superType = (MappedSuperclassDomainType <? super Y >) locateMappedSuperclassType ( mappedSuperclass );
588+ }
589+ else {
590+ superType = null ;
591+ }
583592
584- final EmbeddableTypeImpl <? > embeddableType = new EmbeddableTypeImpl <>(
593+ final EmbeddableTypeImpl <Y > embeddableType = new EmbeddableTypeImpl <>(
585594 javaType ,
586- null ,
595+ superType ,
587596 null ,
588597 false ,
589598 getJpaMetamodel ()
You can’t perform that action at this time.
0 commit comments