https://hibernate.atlassian.net/browse/HHH-16378 The code done for this ticket seems to break the existing logic in our project, due to the addition of this condition in MetadataContext.java: v6.2.2: while(!this.embeddablesToProcess.isEmpty()){ … if ( !( embeddable.getExpressibleJavaType() instanceof EntityJavaType ) ) { this.embeddables.put( embeddable.getJavaType(), embeddable ); if ( staticMetamodelScanEnabled ) { this.populateStaticMetamodel( embeddable ); } } } v6.2.3 onwards: while ( ! embeddablesToProcess.isEmpty() ) { ... // Do not process embeddables for entity types i.e. id-classes or // generic component embeddables used just for concrete type resolution if ( !component.isGeneric() && !( embeddable.getExpressibleJavaType() instanceof EntityJavaType<?> ) ) { embeddables.put( embeddable.getJavaType(), embeddable ); if ( staticMetamodelScanEnabled ) { populateStaticMetamodel( embeddable ); } } } In the attached test case, code fails if we have a embeddable that is generic and extends properties from a superclass. Even though the association between the embeddable and the superclass property is understood in the mapping phase, it doesn't get populated. So while ExampleEmbedded_.user compiles, it throws a NPE at runtime. We have quite a few places entrenched in our project where we need to use a generic embeddable class extending from a super class, with properties defined in the super class. Changing it to stop extending the superclass or making the embeddable non-generic would require quite a bit of rework of the project architecture. |