HHH-17279 EntityType#findSubPathSource fix

This commit is contained in:
Christian Beikov 2023-10-18 16:03:17 +02:00
parent 9f7a321c39
commit e6f26e0754
1 changed files with 2 additions and 4 deletions

View File

@ -154,9 +154,7 @@ public class EntityTypeImpl<J>
}
if ( EntityIdentifierMapping.matchesRoleName( name ) ) {
if ( hasIdClass() ) {
return getIdentifierDescriptor();
}
return hasSingleIdAttribute() ? findIdAttribute() : getIdentifierDescriptor();
}
if ( EntityDiscriminatorMapping.matchesRoleName( name ) ) {
@ -179,7 +177,7 @@ public class EntityTypeImpl<J>
}
if ( EntityIdentifierMapping.matchesRoleName( name ) ) {
return hasIdClass() ? getIdentifierDescriptor() : findIdAttribute();
return hasSingleIdAttribute() ? findIdAttribute() : getIdentifierDescriptor();
}
if ( EntityDiscriminatorMapping.matchesRoleName( name ) ) {