-->
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.  [ 3 posts ] 
Author Message
 Post subject: set the "hbm2ddl.auto" to "update" in hi
PostPosted: Tue Feb 15, 2005 1:30 pm 
Beginner
Beginner

Joined: Fri Mar 12, 2004 5:18 pm
Posts: 44
Hi,

I would like to configure hibernate to keep my datebase data after my session exixts. So I change my "hbm2ddl.auto" to "update" in my configuration.

like this in my code, but it still does not work. Can someone please help me with this. Thank you.


static {
try {
configuration = new Configuration();
configuration.setProperty("hibernate.hbm2ddl.auto", "update");
sessionFactory = configuration.configure().buildSessionFactory();

} catch (Throwable ex) {
// We have to catch Throwable, otherwise we will miss
// NoClassDefFoundError and other subclasses of Error
log.error("Building SessionFactory failed.", ex);
throw new ExceptionInInitializerError(ex);
}
}


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 15, 2005 1:53 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
"Does not work" is not a sufficient problem description.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 15, 2005 4:17 pm 
Beginner
Beginner

Joined: Fri Mar 12, 2004 5:18 pm
Posts: 44
Sorry, I mean the database content still get removed after my session is closed.

Thanks for any help.


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

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.