How to get the column name for an entity attribute using Hibernate

Ok. i found.

((AbstractEntityPersister)((MetamodelImplementor) entityManager.getEntityManagerFactory().unwrap(
SessionFactory.class).getMetamodel()).entityPersister(Reference.class))
.getPropertyColumnNames(“viewName”)
1 Like