From b9612247f5eeaaff8bfc3fb8d92466e35d89b9b0 Mon Sep 17 00:00:00 2001 From: Andrea Boriero Date: Fri, 24 Jul 2020 16:08:39 +0100 Subject: [PATCH] Fix PluralAttributeMapping#findSubpart for elementDescriptor instanceof EmbeddedCollectionPart --- .../metamodel/mapping/internal/PluralAttributeMappingImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/PluralAttributeMappingImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/PluralAttributeMappingImpl.java index 6500dbfd61..0ce5af0b18 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/PluralAttributeMappingImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/PluralAttributeMappingImpl.java @@ -849,6 +849,9 @@ public class PluralAttributeMappingImpl extends AbstractAttributeMapping impleme if ( elementDescriptor instanceof EntityCollectionPart ) { return ( (EntityCollectionPart) elementDescriptor ).findSubPart( name ); } + else if ( elementDescriptor instanceof EmbeddedCollectionPart ) { + return ( (EmbeddedCollectionPart) elementDescriptor ).findSubPart( name, treatTargetType ); + } return null; }