From 1c1572b88ea90a3241bbeda06b9fb015cef3d8e2 Mon Sep 17 00:00:00 2001 From: Marco Belladelli Date: Wed, 12 Jun 2024 09:21:27 +0200 Subject: [PATCH] HHH-18259 Fix check for generated properties for root table only --- .../org/hibernate/persister/entity/AbstractEntityPersister.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java b/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java index ec01e6b802..50c00f2a38 100644 --- a/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java +++ b/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java @@ -4697,7 +4697,7 @@ public abstract class AbstractEntityPersister for ( AttributeMapping generatedAttribute : generatedAttributes ) { // todo (7.0) : support non selectable mappings? Component, ToOneAttributeMapping, ... if ( generatedAttribute.asBasicValuedModelPart() != null - && generatedAttribute.getContainingTableExpression().equals( getSubclassTableName( 0 ) ) ) { + && generatedAttribute.getContainingTableExpression().equals( getRootTableName() ) ) { generatedBasicAttributes.add( generatedAttribute ); } }