Skip to content

Commit 6716829

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

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

0 commit comments

Comments
 (0)