Hello,
My project uses Spring, JPA, and Hibernate, so that all EntityManager's are injected by Spring.
I need to access persistent classes' meta data such as column lengths and optionality. The only way I know to obtain this information is through Hibernate's Configuration.getClassMapping(String className). In a pure Hibernate project without JPA and Spring, you can keep the Configuration after creating a SessionFactory(i.e. new Configuration().configure().buildSessionFactory()), but since Spring uses LocalEntityManagerFactoryBean to create a SessionFactory in the form of EntityManagerFactory, I'm not sure where to get the Configuration.
If it is not possible to retrieve the Configuration from Spring, is there any other way to access a persistent class' meta data?
Thanks.