-->
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.  [ 2 posts ] 
Author Message
 Post subject: hbm2ddl not creating 'drop constraint' for foreign keys
PostPosted: Mon Jun 06, 2005 9:53 am 
Newbie

Joined: Sun Jun 05, 2005 10:00 pm
Posts: 4
Location: Sydney, Australia
I have a strange problem that I hope someone can help with.

I have recently changed from ant to maven for building my project and I've encountered a strange problem...

In my old project, hbm2ddl created a script which started by dropping the foreign key constraints before cropping the tables. This worked fine in my version of mySQL.

After changing to maven (using the hibernate plugin version 1.3), the schema-export goal works ok except that it doesn't drop the contraints before dropping the tables which mySQL doesn't like. It does, however, create the foreign keys correctly afterwards.

So, I thought to save time I'd just go back to invoking hbm2ddl from ant just to generate the schema, but it does the same thing. hibernate.properties is the same, all the hbm.xml files are the same, hibernate2.jar is the same, hibernate-tools.jar is the same.

All I can think of is that some library is different, but I can't find any differences.

Hoping someone knows what's going on...

Thanks,

Pete


Top
 Profile  
 
 Post subject: worked it out..
PostPosted: Mon Jun 06, 2005 10:06 am 
Newbie

Joined: Sun Jun 05, 2005 10:00 pm
Posts: 4
Location: Sydney, Australia
I was just adding a post to give version details and realised that the two projects were actually using different hibernate jars.

Updated maven to get 2.1.8 and everything is working again :-)

Cheers,

Pete


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