File tree 1 file changed +16
-7
lines changed
hibernate-core/src/main/java/org/hibernate/metamodel/internal 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)
575
575
return null ;
576
576
}
577
577
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
+ }
583
592
584
- final EmbeddableTypeImpl <? > embeddableType = new EmbeddableTypeImpl <>(
593
+ final EmbeddableTypeImpl <Y > embeddableType = new EmbeddableTypeImpl <>(
585
594
javaType ,
586
- null ,
595
+ superType ,
587
596
null ,
588
597
false ,
589
598
getJpaMetamodel ()
You can’t perform that action at this time.
0 commit comments