-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Upgrading to Hibernate 4.x from 3.x question
PostPosted: Sun Feb 02, 2014 1:43 pm 
Newbie

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.