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 46974a9c1e
commit 6a64652f42
No known key found for this signature in database
GPG Key ID: D1D0C3030AE3AA35
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;