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


Hello, guys. Can someone help me. I want to create dynamic native sql builder. But i really can’t find, where hibernate holds db column names for attributes.
Thank you.

P.S. i use 5.2 hibernate. And solutions from other topic( ) don’t seem to work


Ok. i found.

((AbstractEntityPersister)((MetamodelImplementor) entityManager.getEntityManagerFactory().unwrap(


Check out this article as well.