Get column name of property mapped with Hibernate

Thanks to Jherico I found out how to do that:

((Column) sessionFactoryBean.getConfiguration().getClassMapping(Person.class.getName())
        .getProperty("myProperty").getColumnIterator().next()).getName();

Leave a Comment