-->
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.  [ 4 posts ] 
Author Message
 Post subject: Stopping sequence table being dropped during schema export?
PostPosted: Sun Nov 30, 2003 7:59 pm 
Newbie

Joined: Sun Nov 30, 2003 7:53 pm
Posts: 2
Hi there,

I have several schemas being exported via the
Code:
new SchemaExport(cfg).create(true, true);
method. The problem is, some of these schemas use a sequence table, and sometimes I only want to drop the tables for some of the schemas. Is there anyway to stop Hibernate from also dropping the sequence table? It causes unique constraint violations etc.

Thanks,
Mal


Top
 Profile  
 
 Post subject: net.sf.hibernate.tool.hbm2ddl.SchemaUpdate
PostPosted: Sun Nov 30, 2003 8:22 pm 
Regular
Regular

Joined: Sun Sep 21, 2003 11:43 pm
Posts: 85
Location: Massachusetts
Why are you always doing drops/adds of tables? Why doesn't net.sf.hibernate.tool.hbm2ddl.SchemaUpdate work for you?

So far, the only drawback I've found using it is if I change an attribute it creates the new one but doesn't know to remove the old named one.

Regards,
David


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 30, 2003 8:25 pm 
Newbie

Joined: Sun Nov 30, 2003 7:53 pm
Posts: 2
Howdy,

Thanks for the reply! I usually use it as just a way of clearing out the database tables automatically, and on occassion to update the schema, the latter for which I'll now use the SchemaUpdate class (thanks!). Is there another quick Hibernate option to simply delete all entries in tables?

Sincerely,
Mal


Top
 Profile  
 
 Post subject: not as far as I know
PostPosted: Sun Nov 30, 2003 8:31 pm 
Regular
Regular

Joined: Sun Sep 21, 2003 11:43 pm
Posts: 85
Location: Massachusetts
From what I've seen, it's mostly an all or nothing: SchemaUpdate for fixing field types or adding new fields (not removing fields and not removing data) or SchemaExport for dropping everything and recreating everything fresh.

Regards,
David


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.