HHH-14408 Defer property type access until integrators ran

This commit is contained in:
Christian Beikov 2021-02-03 13:33:57 +01:00
parent 6fcb83c90d
commit 52785ce0ed
3 changed files with 2 additions and 2 deletions

View File

@ -465,7 +465,6 @@ public class SessionFactoryBuilderImpl implements SessionFactoryBuilderImplement
@Override
public SessionFactory build() {
metadata.validate();
final StandardServiceRegistry serviceRegistry = metadata.getMetadataBuildingOptions().getServiceRegistry();
BytecodeProvider bytecodeProvider = serviceRegistry.getService( BytecodeProvider.class );
addSessionFactoryObservers( new SessionFactoryObserverForBytecodeEnhancer( bytecodeProvider ) );

View File

@ -66,7 +66,7 @@ public class EventEngine {
for ( Iterator<Property> propertyIterator = persistentClass.getDeclaredPropertyIterator(); propertyIterator.hasNext(); ) {
final Property property = propertyIterator.next();
if ( property.getType().isComponentType() ) {
if ( property.isComposite() ) {
this.callbackBuilder.buildCallbacksForEmbeddable(
property,
persistentClass.getMappedClass(),

View File

@ -299,6 +299,7 @@ public class SessionFactoryImpl implements SessionFactoryImplementor {
);
identifierGenerators.put( model.getEntityName(), generator );
} );
metadata.validate();
LOG.debug( "Instantiated session factory" );