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