From a81f9d3e2dde2b3331ea55e9c9fdeccd24ba0027 Mon Sep 17 00:00:00 2001 From: Christian Beikov Date: Tue, 29 Nov 2022 01:43:32 +0100 Subject: [PATCH] Fix HQLTest issue and javadoc aggregation --- .../query/sqm/sql/BaseSqmToSqlAstConverter.java | 9 +++++++-- release/release.gradle | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java index 926bf2fd53..5b69105eaa 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java @@ -4436,8 +4436,13 @@ public abstract class BaseSqmToSqlAstConverter extends Base ? pluralAttributeMapping.getIndexDescriptor() : pluralAttributeMapping.getElementDescriptor(); final ModelPart modelPart; - if ( collectionPart instanceof EntityAssociationMapping ) { - modelPart = ( (EntityAssociationMapping) collectionPart ).getKeyTargetMatchPart(); + if ( collectionPart instanceof OneToManyCollectionPart ) { + final OneToManyCollectionPart toManyPart = (OneToManyCollectionPart) collectionPart; + modelPart = toManyPart.getAssociatedEntityMappingType().getIdentifierMapping(); +// modelPart = pluralAttributeMapping.getKeyDescriptor().getTargetPart(); + } + else if ( collectionPart instanceof ManyToManyCollectionPart ) { + modelPart = ( (ManyToManyCollectionPart) collectionPart ).getKeyTargetMatchPart(); } else { modelPart = collectionPart; diff --git a/release/release.gradle b/release/release.gradle index b6e4f02e6e..36bc068f3f 100644 --- a/release/release.gradle +++ b/release/release.gradle @@ -145,6 +145,7 @@ dependencies { javadocClasspath libs.jackson javadocClasspath gradleApi() javadocClasspath libs.jacksonXml + javadocClasspath dbLibs.oracle }