I get a lot of errors when (re)deploying my application when hbm2ddl is trying to drop foreign keys:
12:57:19,981 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 52) HHH000389: Unsuccessful: alter table Input_Locators drop constraint FK_arbj5vt6ne4x18pecm2eiiqwr if exists
12:57:19,982 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 52) Tabelle "INPUT_LOCATORS" nicht gefunden
Table "INPUT_LOCATORS" not found; SQL statement:
I'm using jboss wildfly with in memory h2. and my hbm2ddl.auto is set to create-drop.
To avoid all this error spam, my idea was to completely remove foreign keys from schema creation. I don't need them. JPA takes care of my data integrity. And for the production environment, I will write my ddl statements manually anyway. But I could not find any documentation on how to configure hbm2ddl so it only creates/drops tables and not foreign keys. Is there any way to do this?