Joined: Sun Feb 02, 2014 10:57 am Posts: 1
|
I've migrated from Hibernate 3.x to Hibernate 4 in my Spring MVC project. So in Hibernate 3 I used to have the following code in my HibernateConfiguration.java file:
AnnotationSessionFactoryBean bean = new AnnotationSessionFactoryBean(); bean.setPackagesToScan(myPackages); bean.setHibernateProperties(props); bean.setDataSource(this.dataSource); bean.setSchemaUpdate(true);
but as far as I've read, AnnotationSessionFactoryBean was replaced with LocalSessionFactoryBean in Hibernate 4 (please correct me if I am wrong). But LocalSessionFactoryBean do not have setSchemaUpdate method so I was wondering how I can set LocalSessionFactoryBean to recreate my DB schema automatically?
Thanks
|
|