From 45460a7085403a7e8ec79165ef9938e105b610ee Mon Sep 17 00:00:00 2001 From: Chris Cranford Date: Mon, 25 Jul 2016 21:09:26 -0500 Subject: [PATCH] HHH-10968 - Skip EntityMode.MAP metadata when JpaMetaModelPopulationSetting is IGNORE_UNSUPPORTED. --- .../hibernate/jpa/internal/metamodel/MetadataContext.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hibernate-entitymanager/src/main/java/org/hibernate/jpa/internal/metamodel/MetadataContext.java b/hibernate-entitymanager/src/main/java/org/hibernate/jpa/internal/metamodel/MetadataContext.java index 303825169f..25e4f6edde 100755 --- a/hibernate-entitymanager/src/main/java/org/hibernate/jpa/internal/metamodel/MetadataContext.java +++ b/hibernate-entitymanager/src/main/java/org/hibernate/jpa/internal/metamodel/MetadataContext.java @@ -121,7 +121,10 @@ class MetadataContext { } /*package*/ void registerEntityType(PersistentClass persistentClass, EntityTypeImpl entityType) { - entityTypes.put( entityType.getBindableJavaType(), entityType ); + // HHH-10968 - Skip EntityMode.MAP entities when ignore unsupported enabled. + if ( !( entityType.getBindableJavaType() == null && ignoreUnsupported ) ) { + entityTypes.put( entityType.getBindableJavaType(), entityType ); + } entityTypesByEntityName.put( persistentClass.getEntityName(), entityType ); entityTypesByPersistentClass.put( persistentClass, entityType ); orderedMappings.add( persistentClass );