-->
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: Is t here a way of changing schemas without loosing data?
PostPosted: Thu Oct 09, 2008 9:18 pm 
Newbie

Joined: Thu Oct 09, 2008 8:51 pm
Posts: 2
I have been searching web, here, and other places. Since Hibernate is such a neat tool my gut tells me there has to be a way of changing schemas without loosing data. I am new to Java and learning techniques that I took for granted in the VB6 world. I have a class that starts with opening a connection for different ODBC models and managing them. Then once a base line schema was done, the class when created would scan the fields and alter the schema as needed. Why reinvent the wheel.

Now I found Hibernate and it seems like a dream come true (with my limited Java experience). The one thing that bothers me is there is no self-healing for the schema without loosing data. Any change Hibernates sees from the mapping file to the table drops the whole table and then creates a whole new schema. I was hoping there was a configuration that would modify this behavior, but I have not found it yet.

My first questions is; “is there a option that causes Hibernate to alter tables instead of the “drop/create new” approach?
I did not see any events or interceptors that explicitly address this. Did I miss one? Is there a work around? Is there some place to get some code examples?

Does these questions make sense?
Thanks in advance for any help.

BTW, Just so the parents of small children don't feel left out, why is the sky blue? :-)

_________________
Thanks,
PE


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.