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
|