HHH-17915 - Composite Key Join HQL

This commit is contained in:
Akshit97 2024-06-09 10:22:35 +05:30
parent e16251afbd
commit c6222fef00
1 changed files with 2 additions and 1 deletions

View File

@ -402,7 +402,8 @@ public abstract class AbstractPropertyMapping implements PropertyMapping {
if ( !hasNonIdentifierPropertyNamedId ) {
String idpath1 = extendPath( path, EntityPersister.ENTITY_ID );
addPropertyPath( idpath1, idtype, columns, columnReaders, columnReaderTemplates, formulaTemplates, factory );
if ( !(idtype.isComponentType() && idtype instanceof EmbeddedComponentType) ) {
if ( !(idtype.isComponentType() && idtype instanceof EmbeddedComponentType) ||
(idtype instanceof EmbeddedComponentType && ((EmbeddedComponentType) idtype).hasNotNullProperty()) ) {
initPropertyPaths( idpath1, idtype, columns, columnReaders, columnReaderTemplates, formulaTemplates, factory );
}
}