diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java b/hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java index af08196a24..a672f12fa6 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java @@ -1614,13 +1614,15 @@ public final class AnnotationBinder { MetadataBuildingContext context, Map inheritanceStatePerClass) throws MappingException { - if ( entityBinder.isPropertyDefinedInSuperHierarchy( inferredData.getPropertyName() ) ) { - LOG.debugf( - "Skipping attribute [%s : %s] as it was already processed as part of super hierarchy", - inferredData.getClassOrElementName(), - inferredData.getPropertyName() - ); - return; + if ( !propertyHolder.isComponent() ) { + if ( entityBinder.isPropertyDefinedInSuperHierarchy( inferredData.getPropertyName() ) ) { + LOG.debugf( + "Skipping attribute [%s : %s] as it was already processed as part of super hierarchy", + inferredData.getClassOrElementName(), + inferredData.getPropertyName() + ); + return; + } } /** diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/annotations/EntityBinder.java b/hibernate-core/src/main/java/org/hibernate/cfg/annotations/EntityBinder.java index c6334acf32..1a7d84c465 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/annotations/EntityBinder.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/annotations/EntityBinder.java @@ -175,9 +175,7 @@ public class EntityBinder { if ( persistentClass == null ) { return false; } - - return inheritanceState.getType() != InheritanceType.JOINED - && persistentClass.isPropertyDefinedInSuperHierarchy( name ); + return persistentClass.isPropertyDefinedInSuperHierarchy( name ); } @SuppressWarnings("SimplifiableConditionalExpression")