Skip to content

Commit 3701533

Browse files
committed
HHH-18829 Hibernate Core - returning false if generated static inner ID class can not be resolved
1 parent bf5db4d commit 3701533

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
@@ -485,9 +485,14 @@ private boolean mapAsIdClass(
485485
final IdClass idClassAnn = classWithIdClass.getDirectAnnotationUsage( IdClass.class );
486486
final ClassDetails compositeClass;
487487
if ( idClassAnn == null ) {
488-
compositeClass = getMetadataCollector().getSourceModelBuildingContext()
489-
.getClassDetailsRegistry()
490-
.resolveClassDetails( inheritanceState.getClassDetails().getClassName() + "_$Id" );
488+
try {
489+
compositeClass = getMetadataCollector().getSourceModelBuildingContext()
490+
.getClassDetailsRegistry()
491+
.resolveClassDetails( inheritanceState.getClassDetails().getClassName() + "_$Id" );
492+
}
493+
catch (RuntimeException e) {
494+
return false;
495+
}
491496
}
492497
else {
493498
final Class<?> idClassValue = idClassAnn.value();

0 commit comments

Comments
 (0)