-->
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: SchemaExport and SchemaUpdate ???
PostPosted: Tue Apr 19, 2005 9:54 am 
Regular
Regular

Joined: Fri Feb 25, 2005 3:02 am
Posts: 71
Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp

[b]Hibernate version:3.0 [/b]

[b]Mapping documents:[/b]

[b]Code between sessionFactory.openSession() and session.close():[/b]

[b]Full stack trace of any exception that occurs:[/b]

[b]Name and version of the database you are using:Posgresql 8.0 [/b]

[b]The generated SQL (show_sql=true):[/b]

[b]Debug level Hibernate log excerpt:[/b]

Hi, i would like to have some more information concerning the tool schemaExport and schemaUpdate.
Suppose that I've created 2 POJO A and B and their .hbm.xml file. In my ant task I call the 'schemaexport' task, which will create table A and B. I then add some data in both table. If later I add an attribute in class A, I then call the schemaupdate class which will imediately add the new field to table A. Up to now everything is Ok. My problem is that, if I now create a new POJO C and its hbm.xml file and call schemaexport task, the latter will delete my old table A and B and its datas and then create table A, B and C. But I don't want table A and B to be deleted since all my datas will be lost.

Can anyone please help me.
thanks in advance


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.