HHH-17460 - Ongoing JPA 32 work

- mapping defaults & persistence unit defaults
This commit is contained in:
Steve Ebersole 2024-03-25 17:49:25 -05:00
parent 6183e7e606
commit e898ed9374
3 changed files with 2 additions and 9 deletions

View File

@ -145,7 +145,7 @@ public class InFlightMetadataCollectorImpl implements InFlightMetadataCollector,
private final MetadataBuildingOptions options; private final MetadataBuildingOptions options;
private final GlobalRegistrations globalRegistrations; private final GlobalRegistrations globalRegistrations;
private PersistenceUnitMetadata persistenceUnitMetadata; private final PersistenceUnitMetadata persistenceUnitMetadata;
private final AttributeConverterManager attributeConverterManager = new AttributeConverterManager(); private final AttributeConverterManager attributeConverterManager = new AttributeConverterManager();
@ -204,6 +204,7 @@ public class InFlightMetadataCollectorImpl implements InFlightMetadataCollector,
this.uuid = UUID.randomUUID(); this.uuid = UUID.randomUUID();
this.globalRegistrations = new GlobalRegistrationsImpl( sourceModelBuildingContext ); this.globalRegistrations = new GlobalRegistrationsImpl( sourceModelBuildingContext );
this.persistenceUnitMetadata = new PersistenceUnitMetadataImpl();
for ( Map.Entry<String, SqmFunctionDescriptor> sqlFunctionEntry : bootstrapContext.getSqlFunctions().entrySet() ) { for ( Map.Entry<String, SqmFunctionDescriptor> sqlFunctionEntry : bootstrapContext.getSqlFunctions().entrySet() ) {
if ( sqlFunctionMap == null ) { if ( sqlFunctionMap == null ) {
@ -728,11 +729,6 @@ public class InFlightMetadataCollectorImpl implements InFlightMetadataCollector,
} }
} }
@Override
public void addPersistenceUnitMetadata(PersistenceUnitMetadata persistenceUnitMetadata) {
this.persistenceUnitMetadata = persistenceUnitMetadata;
}
@Override @Override
public void addDefaultIdentifierGenerator(IdentifierGeneratorDefinition generator) { public void addDefaultIdentifierGenerator(IdentifierGeneratorDefinition generator) {
this.addIdentifierGenerator( generator ); this.addIdentifierGenerator( generator );

View File

@ -424,7 +424,6 @@ public class MetadataBuildingProcess {
assert metadataCollector.getPersistenceUnitMetadata() == xmlPreProcessingResult.getPersistenceUnitMetadata(); assert metadataCollector.getPersistenceUnitMetadata() == xmlPreProcessingResult.getPersistenceUnitMetadata();
metadataCollector.addPersistenceUnitMetadata( xmlPreProcessingResult.getPersistenceUnitMetadata() );
//noinspection unchecked //noinspection unchecked
final List<String> allKnownClassNames = mutableJoin( final List<String> allKnownClassNames = mutableJoin(
managedResources.getAnnotatedClassReferences().stream().map( Class::getName ).collect( Collectors.toList() ), managedResources.getAnnotatedClassReferences().stream().map( Class::getName ).collect( Collectors.toList() ),

View File

@ -253,8 +253,6 @@ public interface InFlightMetadataCollector extends MetadataImplementor {
void addIdentifierGenerator(IdentifierGeneratorDefinition generatorDefinition); void addIdentifierGenerator(IdentifierGeneratorDefinition generatorDefinition);
void addPersistenceUnitMetadata(PersistenceUnitMetadata persistenceUnitMetadata);
/** /**
* Obtain the {@link ConverterRegistry} which may be * Obtain the {@link ConverterRegistry} which may be
* used to register {@link AttributeConverter}s. * used to register {@link AttributeConverter}s.