From f446b0a35e3c2076439ab85e3002a26a1b030221 Mon Sep 17 00:00:00 2001 From: Andrea Boriero Date: Mon, 15 Aug 2016 18:47:09 +0200 Subject: [PATCH] HHH-11037 - Same named subtype embeddable properties ignored (cherry picked from commit 62bfbf8bd9ec3c0b71677befb650fe26a5d46008) Conflicts: hibernate-core/src/main/java/org/hibernate/cfg/annotations/EntityBinder.java --- .../java/org/hibernate/cfg/AnnotationBinder.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) 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 d593524fc3..7db7746ebe 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; + } } /**