HHH-18259 Fix check for generated properties for root table only

This commit is contained in:
Marco Belladelli 2024-06-12 09:21:27 +02:00
parent 9452f9523d
commit 1c1572b88e
1 changed files with 1 additions and 1 deletions

View File

@ -4697,7 +4697,7 @@ public abstract class AbstractEntityPersister
for ( AttributeMapping generatedAttribute : generatedAttributes ) { for ( AttributeMapping generatedAttribute : generatedAttributes ) {
// todo (7.0) : support non selectable mappings? Component, ToOneAttributeMapping, ... // todo (7.0) : support non selectable mappings? Component, ToOneAttributeMapping, ...
if ( generatedAttribute.asBasicValuedModelPart() != null if ( generatedAttribute.asBasicValuedModelPart() != null
&& generatedAttribute.getContainingTableExpression().equals( getSubclassTableName( 0 ) ) ) { && generatedAttribute.getContainingTableExpression().equals( getRootTableName() ) ) {
generatedBasicAttributes.add( generatedAttribute ); generatedBasicAttributes.add( generatedAttribute );
} }
} }