From 052552f3f6077ffa6040c25c8496ddc1e86b37c4 Mon Sep 17 00:00:00 2001 From: Andrea Boriero Date: Tue, 17 Sep 2024 15:32:09 +0200 Subject: [PATCH] HHH-18515 Unrecognized discriminator value exception when running native query on entity with discriminator column --- .../mapping/MappedDiscriminatorConverter.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/MappedDiscriminatorConverter.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/MappedDiscriminatorConverter.java index 040ecf2c05..c6fffadb5d 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/MappedDiscriminatorConverter.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/MappedDiscriminatorConverter.java @@ -11,7 +11,9 @@ import org.hibernate.metamodel.mapping.internal.DiscriminatorValueDetailsImpl; import org.hibernate.metamodel.model.domain.NavigableRole; import org.hibernate.metamodel.spi.MappingMetamodelImplementor; import org.hibernate.type.BasicType; +import org.hibernate.type.descriptor.java.CharacterJavaType; import org.hibernate.type.descriptor.java.JavaType; +import org.hibernate.type.descriptor.java.StringJavaType; import java.util.List; import java.util.Map; @@ -111,6 +113,23 @@ public class MappedDiscriminatorConverter extends DiscriminatorConverter