HHH-16543 Correct check for polymorphic root common attributes

This commit is contained in:
Marco Belladelli 2023-05-22 12:25:29 +02:00
parent c6c24700a5
commit 7116dc9def
1 changed files with 2 additions and 2 deletions

View File

@ -91,8 +91,8 @@ public class SqmPolymorphicRootDescriptor<T> implements EntityDomainType<T> {
private static boolean isACommonAttribute(List<EntityDomainType<?>> subList, PersistentAttribute<?, ?> attribute) {
// for each of its attributes, check whether the other implementors also expose it
for ( EntityDomainType navigable : subList ) {
if ( navigable.findAttribute( attribute.getName() ) != null ) {
for ( EntityDomainType<?> navigable : subList ) {
if ( navigable.findAttribute( attribute.getName() ) == null ) {
// we found an implementor that does not expose that attribute,
// so break-out to the next attribute
return false;