Search in sources :

Example 56 with EntityMappingType

use of org.hibernate.metamodel.mapping.EntityMappingType in project hibernate-orm by hibernate.

the class TableCommentTest method getTableName.

private String getTableName() {
    final SessionFactoryImplementor sessionFactory = sessionFactory();
    final EntityMappingType entityMappingType = sessionFactory.getRuntimeMetamodels().getEntityMappingType(TableWithComment.class);
    return ((AbstractEntityPersister) entityMappingType).getTableName();
}
Also used : SessionFactoryImplementor(org.hibernate.engine.spi.SessionFactoryImplementor) EntityMappingType(org.hibernate.metamodel.mapping.EntityMappingType) AbstractEntityPersister(org.hibernate.persister.entity.AbstractEntityPersister)

Aggregations

EntityMappingType (org.hibernate.metamodel.mapping.EntityMappingType)56 SessionFactoryImplementor (org.hibernate.engine.spi.SessionFactoryImplementor)19 PluralAttributeMapping (org.hibernate.metamodel.mapping.PluralAttributeMapping)16 TableGroup (org.hibernate.sql.ast.tree.from.TableGroup)16 Test (org.junit.jupiter.api.Test)16 EntityIdentifierMapping (org.hibernate.metamodel.mapping.EntityIdentifierMapping)15 EntityPersister (org.hibernate.persister.entity.EntityPersister)14 AttributeMapping (org.hibernate.metamodel.mapping.AttributeMapping)11 List (java.util.List)10 ModelPart (org.hibernate.metamodel.mapping.ModelPart)10 ArrayList (java.util.ArrayList)9 MappingMetamodel (org.hibernate.metamodel.MappingMetamodel)9 ColumnReference (org.hibernate.sql.ast.tree.expression.ColumnReference)8 TableReference (org.hibernate.sql.ast.tree.from.TableReference)8 BasicValuedModelPart (org.hibernate.metamodel.mapping.BasicValuedModelPart)7 StateArrayContributorMetadata (org.hibernate.metamodel.mapping.StateArrayContributorMetadata)7 ToOneAttributeMapping (org.hibernate.metamodel.mapping.internal.ToOneAttributeMapping)7 NavigablePath (org.hibernate.query.spi.NavigablePath)7 NamedTableReference (org.hibernate.sql.ast.tree.from.NamedTableReference)7 SelectStatement (org.hibernate.sql.ast.tree.select.SelectStatement)7