Search in sources :

Example 1 with RuntimeModelCreationContext

use of org.hibernate.metamodel.spi.RuntimeModelCreationContext in project hibernate-orm by hibernate.

the class EmbeddableMappingTypeImpl method from.

public static EmbeddableMappingTypeImpl from(Component bootDescriptor, CompositeType compositeType, String rootTableExpression, String[] rootTableKeyColumnNames, Function<EmbeddableMappingType, EmbeddableValuedModelPart> embeddedPartBuilder, MappingModelCreationProcess creationProcess) {
    final RuntimeModelCreationContext creationContext = creationProcess.getCreationContext();
    final EmbeddableMappingTypeImpl mappingType = new EmbeddableMappingTypeImpl(bootDescriptor, embeddedPartBuilder, creationContext);
    if (compositeType instanceof CompositeTypeImplementor) {
        ((CompositeTypeImplementor) compositeType).injectMappingModelPart(mappingType.getEmbeddedValueMapping(), creationProcess);
    }
    creationProcess.registerInitializationCallback("EmbeddableMappingType(" + mappingType.getNavigableRole().getFullPath() + ")#finishInitialization", () -> mappingType.finishInitialization(bootDescriptor, compositeType, rootTableExpression, rootTableKeyColumnNames, creationProcess));
    return mappingType;
}
Also used : CompositeTypeImplementor(org.hibernate.type.spi.CompositeTypeImplementor) RuntimeModelCreationContext(org.hibernate.metamodel.spi.RuntimeModelCreationContext)

Example 2 with RuntimeModelCreationContext

use of org.hibernate.metamodel.spi.RuntimeModelCreationContext in project hibernate-orm by hibernate.

the class SqmMutationStrategyHelper method resolveInsertStrategy.

/**
 * Standard resolution of SqmInsertStrategy to use for a given
 * entity hierarchy.
 */
public static SqmMultiTableInsertStrategy resolveInsertStrategy(RootClass entityBootDescriptor, EntityMappingType rootEntityDescriptor, MappingModelCreationProcess creationProcess) {
    final RuntimeModelCreationContext creationContext = creationProcess.getCreationContext();
    final SessionFactoryImplementor sessionFactory = creationContext.getSessionFactory();
    final SessionFactoryOptions options = sessionFactory.getSessionFactoryOptions();
    final SqmMultiTableInsertStrategy specifiedStrategy = options.getCustomSqmMultiTableInsertStrategy();
    if (specifiedStrategy != null) {
        return specifiedStrategy;
    }
    return sessionFactory.getServiceRegistry().getService(JdbcServices.class).getJdbcEnvironment().getDialect().getFallbackSqmInsertStrategy(rootEntityDescriptor, creationContext);
}
Also used : RuntimeModelCreationContext(org.hibernate.metamodel.spi.RuntimeModelCreationContext) SessionFactoryImplementor(org.hibernate.engine.spi.SessionFactoryImplementor) SqmMultiTableInsertStrategy(org.hibernate.query.sqm.mutation.spi.SqmMultiTableInsertStrategy) SessionFactoryOptions(org.hibernate.boot.spi.SessionFactoryOptions) JdbcServices(org.hibernate.engine.jdbc.spi.JdbcServices)

Example 3 with RuntimeModelCreationContext

use of org.hibernate.metamodel.spi.RuntimeModelCreationContext in project hibernate-orm by hibernate.

the class PropertyFactory method buildEntityBasedAttribute.

/**
 * Generate a non-identifier (and non-version) attribute based on the given mapped property from the given entity
 *
 * @param property The mapped property.
 * @param lazyAvailable Is property lazy loading currently available.
 *
 * @return The appropriate NonIdentifierProperty definition.
 */
public static NonIdentifierAttribute buildEntityBasedAttribute(EntityPersister persister, SessionFactoryImplementor sessionFactory, int attributeNumber, Property property, boolean lazyAvailable, RuntimeModelCreationContext creationContext) {
    final Type type = property.getValue().getType();
    final NonIdentifierAttributeNature nature = decode(type);
    // we need to dirty check collections, since they can cause an owner
    // version number increment
    // we need to dirty check many-to-ones with not-found="ignore" in order
    // to update the cache (not the database), since in this case a null
    // entity reference can lose information
    boolean alwaysDirtyCheck = type.isAssociationType() && ((AssociationType) type).isAlwaysDirtyChecked();
    SessionFactoryOptions sessionFactoryOptions = sessionFactory.getSessionFactoryOptions();
    final boolean lazy = !EnhancementHelper.includeInBaseFetchGroup(property, lazyAvailable, entityName -> {
        final MetadataImplementor metadata = creationContext.getMetadata();
        final PersistentClass entityBinding = metadata.getEntityBinding(entityName);
        assert entityBinding != null;
        return entityBinding.hasSubclasses();
    }, sessionFactoryOptions.isCollectionsInDefaultFetchGroupEnabled());
    switch(nature) {
        case BASIC:
            {
                return new EntityBasedBasicAttribute(persister, sessionFactory, attributeNumber, property.getName(), type, new BaselineAttributeInformation.Builder().setLazy(lazy).setInsertable(property.isInsertable()).setUpdateable(property.isUpdateable()).setValueGenerationStrategy(property.getValueGenerationStrategy()).setNullable(property.isOptional()).setDirtyCheckable(alwaysDirtyCheck || property.isUpdateable()).setVersionable(property.isOptimisticLocked()).setCascadeStyle(property.getCascadeStyle()).setFetchMode(property.getValue().getFetchMode()).createInformation());
            }
        case COMPOSITE:
            {
                return new EntityBasedCompositionAttribute(persister, sessionFactory, attributeNumber, property.getName(), (CompositeType) type, new BaselineAttributeInformation.Builder().setLazy(lazy).setInsertable(property.isInsertable()).setUpdateable(property.isUpdateable()).setValueGenerationStrategy(property.getValueGenerationStrategy()).setNullable(property.isOptional()).setDirtyCheckable(alwaysDirtyCheck || property.isUpdateable()).setVersionable(property.isOptimisticLocked()).setCascadeStyle(property.getCascadeStyle()).setFetchMode(property.getValue().getFetchMode()).createInformation());
            }
        case ENTITY:
        case ANY:
        case COLLECTION:
            {
                return new EntityBasedAssociationAttribute(persister, sessionFactory, attributeNumber, property.getName(), (AssociationType) type, new BaselineAttributeInformation.Builder().setLazy(lazy).setInsertable(property.isInsertable()).setUpdateable(property.isUpdateable()).setValueGenerationStrategy(property.getValueGenerationStrategy()).setNullable(property.isOptional()).setDirtyCheckable(alwaysDirtyCheck || property.isUpdateable()).setVersionable(property.isOptimisticLocked()).setCascadeStyle(property.getCascadeStyle()).setFetchMode(property.getValue().getFetchMode()).createInformation());
            }
        default:
            {
                throw new HibernateException("Internal error");
            }
    }
}
Also used : IdentifierGenerator(org.hibernate.id.IdentifierGenerator) EntityPersister(org.hibernate.persister.entity.EntityPersister) ReflectHelper(org.hibernate.internal.util.ReflectHelper) Property(org.hibernate.mapping.Property) PropertyAccessStrategy(org.hibernate.property.access.spi.PropertyAccessStrategy) EntityBasedBasicAttribute(org.hibernate.tuple.entity.EntityBasedBasicAttribute) SessionFactoryOptions(org.hibernate.boot.spi.SessionFactoryOptions) EntityBasedAssociationAttribute(org.hibernate.tuple.entity.EntityBasedAssociationAttribute) Constructor(java.lang.reflect.Constructor) RepresentationMode(org.hibernate.metamodel.RepresentationMode) PropertyAccess(org.hibernate.property.access.spi.PropertyAccess) PropertyAccessStrategyResolver(org.hibernate.property.access.spi.PropertyAccessStrategyResolver) VersionProperty(org.hibernate.tuple.entity.VersionProperty) EntityBasedCompositionAttribute(org.hibernate.tuple.entity.EntityBasedCompositionAttribute) PersistentClass(org.hibernate.mapping.PersistentClass) RuntimeModelCreationContext(org.hibernate.metamodel.spi.RuntimeModelCreationContext) CompositeType(org.hibernate.type.CompositeType) MetadataImplementor(org.hibernate.boot.spi.MetadataImplementor) HibernateException(org.hibernate.HibernateException) AssociationType(org.hibernate.type.AssociationType) SessionFactoryImplementor(org.hibernate.engine.spi.SessionFactoryImplementor) Getter(org.hibernate.property.access.spi.Getter) EnhancementHelper(org.hibernate.bytecode.enhance.spi.interceptor.EnhancementHelper) Type(org.hibernate.type.Type) EntityBasedCompositionAttribute(org.hibernate.tuple.entity.EntityBasedCompositionAttribute) HibernateException(org.hibernate.HibernateException) MetadataImplementor(org.hibernate.boot.spi.MetadataImplementor) CompositeType(org.hibernate.type.CompositeType) AssociationType(org.hibernate.type.AssociationType) Type(org.hibernate.type.Type) EntityBasedAssociationAttribute(org.hibernate.tuple.entity.EntityBasedAssociationAttribute) AssociationType(org.hibernate.type.AssociationType) SessionFactoryOptions(org.hibernate.boot.spi.SessionFactoryOptions) EntityBasedBasicAttribute(org.hibernate.tuple.entity.EntityBasedBasicAttribute) PersistentClass(org.hibernate.mapping.PersistentClass) CompositeType(org.hibernate.type.CompositeType)

Example 4 with RuntimeModelCreationContext

use of org.hibernate.metamodel.spi.RuntimeModelCreationContext in project hibernate-orm by hibernate.

the class AbstractEntityPersister method prepareMappingModel.

@Override
public void prepareMappingModel(MappingModelCreationProcess creationProcess) {
    if (identifierMapping != null) {
        return;
    }
    final RuntimeModelCreationContext creationContext = creationProcess.getCreationContext();
    final PersistentClass bootEntityDescriptor = creationContext.getBootModel().getEntityBinding(getEntityName());
    // EntityMappingType rootEntityDescriptor;
    if (superMappingType != null) {
        ((InFlightEntityMappingType) superMappingType).prepareMappingModel(creationProcess);
        if (shouldProcessSuperMapping()) {
            this.discriminatorMapping = superMappingType.getDiscriminatorMapping();
            this.identifierMapping = superMappingType.getIdentifierMapping();
            this.naturalIdMapping = superMappingType.getNaturalIdMapping();
            this.versionMapping = superMappingType.getVersionMapping();
            this.rowIdMapping = superMappingType.getRowIdMapping();
        } else {
            prepareMappingModel(creationProcess, bootEntityDescriptor);
        }
    // rootEntityDescriptor = superMappingType.getRootEntityDescriptor();
    } else {
        prepareMappingModel(creationProcess, bootEntityDescriptor);
    // rootEntityDescriptor = this;
    }
    final EntityMetamodel currentEntityMetamodel = this.getEntityMetamodel();
    int stateArrayPosition = getStateArrayInitialPosition(creationProcess);
    NonIdentifierAttribute[] properties = currentEntityMetamodel.getProperties();
    for (int i = 0; i < currentEntityMetamodel.getPropertySpan(); i++) {
        final NonIdentifierAttribute runtimeAttrDefinition = properties[i];
        final Property bootProperty = bootEntityDescriptor.getProperty(runtimeAttrDefinition.getName());
        if (superMappingType == null || superMappingType.findAttributeMapping(bootProperty.getName()) == null) {
            declaredAttributeMappings.put(runtimeAttrDefinition.getName(), generateNonIdAttributeMapping(runtimeAttrDefinition, bootProperty, stateArrayPosition++, creationProcess));
        }
    // else {
    // its defined on the supertype, skip it here
    // }
    }
    getAttributeMappings();
    postProcessAttributeMappings(creationProcess, bootEntityDescriptor);
    final ReflectionOptimizer reflectionOptimizer = representationStrategy.getReflectionOptimizer();
    if (reflectionOptimizer != null) {
        accessOptimizer = reflectionOptimizer.getAccessOptimizer();
    } else {
        accessOptimizer = null;
    }
    // register a callback for after all `#prepareMappingModel` calls have finished.  here we want to delay the
    // generation of `staticFetchableList` because we need to wait until after all sub-classes have had their
    // `#prepareMappingModel` called (and their declared attribute mappings resolved)
    creationProcess.registerInitializationCallback("Entity(" + getEntityName() + ") `staticFetchableList` generator", () -> {
        if (hasInsertGeneratedProperties()) {
            insertGeneratedValuesProcessor = createGeneratedValuesProcessor(GenerationTiming.INSERT);
        }
        if (hasUpdateGeneratedProperties()) {
            updateGeneratedValuesProcessor = createGeneratedValuesProcessor(GenerationTiming.ALWAYS);
        }
        staticFetchableList = new ArrayList<>(attributeMappings.size());
        visitSubTypeAttributeMappings(attributeMapping -> staticFetchableList.add(attributeMapping));
        return true;
    });
    boolean needsMultiTableInsert = hasMultipleTables();
    if (needsMultiTableInsert) {
        creationProcess.registerInitializationCallback("Entity(" + getEntityName() + ") `sqmMultiTableMutationStrategy` interpretation", () -> {
            sqmMultiTableMutationStrategy = interpretSqmMultiTableStrategy(this, creationProcess);
            if (sqmMultiTableMutationStrategy == null) {
                return false;
            }
            sqmMultiTableMutationStrategy.prepare(creationProcess, creationContext.getSessionFactory().getJdbcServices().getBootstrapJdbcConnectionAccess());
            return true;
        });
    } else {
        sqmMultiTableMutationStrategy = null;
    }
    if (!needsMultiTableInsert && getIdentifierGenerator() instanceof BulkInsertionCapableIdentifierGenerator) {
        if (getIdentifierGenerator() instanceof OptimizableGenerator) {
            final Optimizer optimizer = ((OptimizableGenerator) getIdentifierGenerator()).getOptimizer();
            needsMultiTableInsert = optimizer != null && optimizer.getIncrementSize() > 1;
        }
    }
    if (needsMultiTableInsert) {
        creationProcess.registerInitializationCallback("Entity(" + getEntityName() + ") `sqmMultiTableInsertStrategy` interpretation", () -> {
            sqmMultiTableInsertStrategy = interpretSqmMultiTableInsertStrategy(this, creationProcess);
            if (sqmMultiTableInsertStrategy == null) {
                return false;
            }
            sqmMultiTableInsertStrategy.prepare(creationProcess, creationContext.getSessionFactory().getJdbcServices().getBootstrapJdbcConnectionAccess());
            return true;
        });
    } else {
        sqmMultiTableInsertStrategy = null;
    }
}
Also used : InFlightEntityMappingType(org.hibernate.metamodel.mapping.internal.InFlightEntityMappingType) OptimizableGenerator(org.hibernate.id.OptimizableGenerator) Optimizer(org.hibernate.id.enhanced.Optimizer) ReflectionOptimizer(org.hibernate.bytecode.spi.ReflectionOptimizer) BulkInsertionCapableIdentifierGenerator(org.hibernate.id.BulkInsertionCapableIdentifierGenerator) RuntimeModelCreationContext(org.hibernate.metamodel.spi.RuntimeModelCreationContext) NonIdentifierAttribute(org.hibernate.tuple.NonIdentifierAttribute) ReflectionOptimizer(org.hibernate.bytecode.spi.ReflectionOptimizer) EntityMetamodel(org.hibernate.tuple.entity.EntityMetamodel) Property(org.hibernate.mapping.Property) PersistentClass(org.hibernate.mapping.PersistentClass)

Example 5 with RuntimeModelCreationContext

use of org.hibernate.metamodel.spi.RuntimeModelCreationContext in project hibernate-orm by hibernate.

the class JpaMetamodelImpl method processJpa.

public void processJpa(MetadataImplementor bootMetamodel, MappingMetamodel mappingMetamodel, Map<Class<?>, String> entityProxyInterfaceMap, JpaStaticMetaModelPopulationSetting jpaStaticMetaModelPopulationSetting, JpaMetaModelPopulationSetting jpaMetaModelPopulationSetting, Collection<NamedEntityGraphDefinition> namedEntityGraphDefinitions, RuntimeModelCreationContext runtimeModelCreationContext) {
    bootMetamodel.getImports().forEach((k, v) -> this.nameToImportMap.put(k, new ImportInfo<>(v, null)));
    this.entityProxyInterfaceMap.putAll(entityProxyInterfaceMap);
    final MetadataContext context = new MetadataContext(this, mappingMetamodel, bootMetamodel, jpaStaticMetaModelPopulationSetting, jpaMetaModelPopulationSetting, runtimeModelCreationContext);
    for (PersistentClass entityBinding : bootMetamodel.getEntityBindings()) {
        locateOrBuildEntityType(entityBinding, context, typeConfiguration);
    }
    handleUnusedMappedSuperclasses(context, typeConfiguration);
    context.wrapUp();
    for (Map.Entry<String, IdentifiableDomainType<?>> entry : context.getIdentifiableTypesByName().entrySet()) {
        if (entry.getValue() instanceof EntityDomainType<?>) {
            this.jpaEntityTypeMap.put(entry.getKey(), (EntityDomainType<?>) entry.getValue());
        }
    }
    this.jpaManagedTypeMap.putAll(context.getEntityTypeMap());
    this.jpaManagedTypeMap.putAll(context.getMappedSuperclassTypeMap());
    switch(jpaMetaModelPopulationSetting) {
        case IGNORE_UNSUPPORTED:
            this.jpaManagedTypes.addAll(context.getEntityTypeMap().values());
            this.jpaManagedTypes.addAll(context.getMappedSuperclassTypeMap().values());
            break;
        case ENABLED:
            this.jpaManagedTypes.addAll(context.getIdentifiableTypesByName().values());
            break;
    }
    for (EmbeddableDomainType<?> embeddable : context.getEmbeddableTypeSet()) {
        switch(jpaMetaModelPopulationSetting) {
            case IGNORE_UNSUPPORTED:
                if (embeddable.getJavaType() != null && embeddable.getJavaType() != Map.class) {
                    this.jpaEmbeddables.add(embeddable);
                    this.jpaManagedTypes.add(embeddable);
                    if (!(embeddable.getExpressibleJavaType() instanceof EntityJavaType<?>)) {
                        this.jpaManagedTypeMap.put(embeddable.getJavaType(), embeddable);
                    }
                }
                break;
            case ENABLED:
                this.jpaEmbeddables.add(embeddable);
                this.jpaManagedTypes.add(embeddable);
                if (embeddable.getJavaType() != null && !(embeddable.getExpressibleJavaType() instanceof EntityJavaType<?>)) {
                    this.jpaManagedTypeMap.put(embeddable.getJavaType(), embeddable);
                }
                break;
            case DISABLED:
                if (embeddable.getJavaType() == null) {
                    throw new UnsupportedOperationException("ANY not supported");
                }
                if (!(embeddable.getExpressibleJavaType() instanceof EntityJavaType<?>)) {
                    this.jpaManagedTypeMap.put(embeddable.getJavaType(), embeddable);
                }
                break;
        }
    }
    final Consumer<PersistentAttribute<?, ?>> attributeConsumer = persistentAttribute -> {
        if (persistentAttribute.getJavaType() != null && persistentAttribute.getJavaType().isEnum()) {
            @SuppressWarnings("unchecked") final Class<Enum<?>> enumClass = (Class<Enum<?>>) persistentAttribute.getJavaType();
            final Enum<?>[] enumConstants = enumClass.getEnumConstants();
            for (Enum<?> enumConstant : enumConstants) {
                final String qualifiedEnumLiteral = enumConstant.getDeclaringClass().getSimpleName() + "." + enumConstant.name();
                this.allowedEnumLiteralTexts.computeIfAbsent(enumConstant.name(), k -> new HashMap<>()).put(enumClass, enumConstant);
                this.allowedEnumLiteralTexts.computeIfAbsent(qualifiedEnumLiteral, k -> new HashMap<>()).put(enumClass, enumConstant);
            }
        }
    };
    domainTypeStream(context).forEach(managedDomainType -> managedDomainType.visitAttributes(attributeConsumer));
    applyNamedEntityGraphs(namedEntityGraphDefinitions);
}
Also used : JpaStaticMetaModelPopulationSetting(org.hibernate.metamodel.internal.JpaStaticMetaModelPopulationSetting) EntityType(jakarta.persistence.metamodel.EntityType) Attribute(jakarta.persistence.metamodel.Attribute) ManagedDomainType(org.hibernate.metamodel.model.domain.ManagedDomainType) IdentifiableDomainType(org.hibernate.metamodel.model.domain.IdentifiableDomainType) JpaMetamodel(org.hibernate.metamodel.model.domain.JpaMetamodel) PersistentClass(org.hibernate.mapping.PersistentClass) Map(java.util.Map) SqmPolymorphicRootDescriptor(org.hibernate.query.sqm.tree.domain.SqmPolymorphicRootDescriptor) SessionFactoryImplementor(org.hibernate.engine.spi.SessionFactoryImplementor) HEMLogging(org.hibernate.internal.HEMLogging) DynamicModelJavaType(org.hibernate.type.descriptor.java.spi.DynamicModelJavaType) TypeConfiguration(org.hibernate.type.spi.TypeConfiguration) Collection(java.util.Collection) ClassLoaderService(org.hibernate.boot.registry.classloading.spi.ClassLoaderService) JpaMetaModelPopulationSetting(org.hibernate.metamodel.internal.JpaMetaModelPopulationSetting) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) NamedAttributeNode(jakarta.persistence.NamedAttributeNode) StringHelper(org.hibernate.internal.util.StringHelper) Set(java.util.Set) MetadataContext(org.hibernate.metamodel.internal.MetadataContext) EntityGraph(jakarta.persistence.EntityGraph) EntityManagerMessageLogger(org.hibernate.internal.EntityManagerMessageLogger) Serializable(java.io.Serializable) MappingMetamodel(org.hibernate.metamodel.MappingMetamodel) List(java.util.List) AttributeNodeImplementor(org.hibernate.graph.spi.AttributeNodeImplementor) Stream(java.util.stream.Stream) RuntimeModelCreationContext(org.hibernate.metamodel.spi.RuntimeModelCreationContext) JpaMetamodelImplementor(org.hibernate.metamodel.model.domain.spi.JpaMetamodelImplementor) EmbeddableType(jakarta.persistence.metamodel.EmbeddableType) NamedEntityGraphDefinition(org.hibernate.cfg.annotations.NamedEntityGraphDefinition) Queryable(org.hibernate.persister.entity.Queryable) RootGraphImpl(org.hibernate.graph.internal.RootGraphImpl) JavaType(org.hibernate.type.descriptor.java.JavaType) HashMap(java.util.HashMap) NamedSubgraph(jakarta.persistence.NamedSubgraph) MappedSuperclassDomainType(org.hibernate.metamodel.model.domain.MappedSuperclassDomainType) ArrayList(java.util.ArrayList) RootGraphImplementor(org.hibernate.graph.spi.RootGraphImplementor) HashSet(java.util.HashSet) NamedEntityGraph(jakarta.persistence.NamedEntityGraph) EntityDomainType(org.hibernate.metamodel.model.domain.EntityDomainType) PersistentAttribute(org.hibernate.metamodel.model.domain.PersistentAttribute) MetadataImplementor(org.hibernate.boot.spi.MetadataImplementor) MappedSuperclass(org.hibernate.mapping.MappedSuperclass) SubGraphImplementor(org.hibernate.graph.spi.SubGraphImplementor) ManagedType(jakarta.persistence.metamodel.ManagedType) EmbeddableDomainType(org.hibernate.metamodel.model.domain.EmbeddableDomainType) Consumer(java.util.function.Consumer) ObjectStreamException(java.io.ObjectStreamException) GraphImplementor(org.hibernate.graph.spi.GraphImplementor) TreeMap(java.util.TreeMap) JpaCompliance(org.hibernate.jpa.spi.JpaCompliance) ClassLoadingException(org.hibernate.boot.registry.classloading.spi.ClassLoadingException) EntityJavaType(org.hibernate.type.descriptor.java.spi.EntityJavaType) EntityJavaType(org.hibernate.type.descriptor.java.spi.EntityJavaType) IdentifiableDomainType(org.hibernate.metamodel.model.domain.IdentifiableDomainType) PersistentAttribute(org.hibernate.metamodel.model.domain.PersistentAttribute) PersistentClass(org.hibernate.mapping.PersistentClass) MetadataContext(org.hibernate.metamodel.internal.MetadataContext) EntityDomainType(org.hibernate.metamodel.model.domain.EntityDomainType) Map(java.util.Map) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashMap(java.util.HashMap) TreeMap(java.util.TreeMap) PersistentClass(org.hibernate.mapping.PersistentClass)

Aggregations

RuntimeModelCreationContext (org.hibernate.metamodel.spi.RuntimeModelCreationContext)8 SessionFactoryImplementor (org.hibernate.engine.spi.SessionFactoryImplementor)5 PersistentClass (org.hibernate.mapping.PersistentClass)5 SessionFactoryOptions (org.hibernate.boot.spi.SessionFactoryOptions)3 List (java.util.List)2 MetadataImplementor (org.hibernate.boot.spi.MetadataImplementor)2 MappedSuperclass (org.hibernate.mapping.MappedSuperclass)2 MappingMetamodel (org.hibernate.metamodel.MappingMetamodel)2 JpaMetaModelPopulationSetting (org.hibernate.metamodel.internal.JpaMetaModelPopulationSetting)2 JpaStaticMetaModelPopulationSetting (org.hibernate.metamodel.internal.JpaStaticMetaModelPopulationSetting)2 CollectionPersister (org.hibernate.persister.collection.CollectionPersister)2 EntityGraph (jakarta.persistence.EntityGraph)1 NamedAttributeNode (jakarta.persistence.NamedAttributeNode)1 NamedEntityGraph (jakarta.persistence.NamedEntityGraph)1 NamedSubgraph (jakarta.persistence.NamedSubgraph)1 Attribute (jakarta.persistence.metamodel.Attribute)1 EmbeddableType (jakarta.persistence.metamodel.EmbeddableType)1 EntityType (jakarta.persistence.metamodel.EntityType)1 ManagedType (jakarta.persistence.metamodel.ManagedType)1 ObjectStreamException (java.io.ObjectStreamException)1