-->
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: Creating tables from Class Definitions
PostPosted: Sat Aug 19, 2006 6:47 am 
Newbie

Joined: Fri Aug 18, 2006 9:11 am
Posts: 7
Hi,

I want Hibernate to create the tables in the database, if they dont already exist.

I tried setting the hibernate.hbm2ddl.auto property to create, but this creates a new table everytime I run the program, and thus deletes any existing data. Instead, I want to create the tables only if they dont exist and use the existing ones if they already exist, since I would want to preserve the data across various invocations of my application.

Please help!

Thanks in advance
-Abhishek


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 20, 2006 7:24 am 
Newbie

Joined: Sun Jun 04, 2006 8:46 am
Posts: 13
Try "update" instead of "create", but note that some indices are not created with the "update" value.

_________________
--- cogens


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 20, 2006 7:24 am 
Newbie

Joined: Sun Jun 04, 2006 8:46 am
Posts: 13
Try "update" instead of "create", but note that some indices are not created with the "update" value.

_________________
--- cogens


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.