HHH-12871 - Fix metamodel to properly exclude dynamic-map based types when using ignoreUnsupported.
This commit is contained in:
parent
6a594712db
commit
b9e0449602
|
@ -116,16 +116,23 @@ class MetadataContext {
|
|||
}
|
||||
|
||||
/*package*/ void registerEntityType(PersistentClass persistentClass, EntityTypeImpl<?> entityType) {
|
||||
if ( ignoreUnsupported && entityType.getBindableJavaType() == null ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( entityType.getBindableJavaType() != null ) {
|
||||
entityTypes.put( entityType.getBindableJavaType(), entityType );
|
||||
}
|
||||
|
||||
entityTypesByEntityName.put( persistentClass.getEntityName(), entityType );
|
||||
entityTypesByPersistentClass.put( persistentClass, entityType );
|
||||
orderedMappings.add( persistentClass );
|
||||
}
|
||||
|
||||
/*package*/ void registerEmbeddedableType(EmbeddableTypeImpl<?> embeddableType) {
|
||||
embeddables.add( embeddableType );
|
||||
if ( !( ignoreUnsupported && embeddableType.getParent().getJavaType() == null ) ) {
|
||||
embeddables.add( embeddableType );
|
||||
}
|
||||
}
|
||||
|
||||
/*package*/ void registerMappedSuperclassType(
|
||||
|
|
|
@ -570,7 +570,7 @@ public class MetamodelImpl implements MetamodelImplementor, Serializable {
|
|||
jpaEntityTypeMap.size() + jpaMappedSuperclassTypeMap.size() + jpaEmbeddableTypes.size()
|
||||
);
|
||||
final Set<ManagedType<?>> managedTypes = new HashSet<ManagedType<?>>( setSize );
|
||||
managedTypes.addAll( jpaEntityTypeMap.values() );
|
||||
managedTypes.addAll( jpaEntityTypesByEntityName.values() );
|
||||
managedTypes.addAll( jpaMappedSuperclassTypeMap.values() );
|
||||
managedTypes.addAll( jpaEmbeddableTypes );
|
||||
return managedTypes;
|
||||
|
|
Loading…
Reference in New Issue