Skip to content

Commit 3c8d32e

Browse files
committed
HHH-18829 Hibernate Core - returning false if generated static inner ID class can not be resolved
1 parent 6971caa commit 3c8d32e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

hibernate-core/src/main/java/org/hibernate/boot/model/internal/EntityBinder.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,9 +484,14 @@ private boolean mapAsIdClass(
484484
final IdClass idClassAnn = classWithIdClass.getDirectAnnotationUsage( IdClass.class );
485485
final ClassDetails compositeClass;
486486
if ( idClassAnn == null ) {
487-
compositeClass = getMetadataCollector().getSourceModelBuildingContext()
488-
.getClassDetailsRegistry()
489-
.resolveClassDetails( inheritanceState.getClassDetails().getClassName() + "_$Id" );
487+
try {
488+
compositeClass = getMetadataCollector().getSourceModelBuildingContext()
489+
.getClassDetailsRegistry()
490+
.resolveClassDetails( inheritanceState.getClassDetails().getClassName() + "_$Id" );
491+
}
492+
catch (RuntimeException e) {
493+
return false;
494+
}
490495
}
491496
else {
492497
final Class<?> idClassValue = idClassAnn.value();

0 commit comments

Comments
 (0)