I'm migrating my application from 4.2.2.Final to 5.2.8.Final. Because I use envers, I need to set the property hbm2ddl to true. When I start the server, Hibernate returns these errors:
2017-07-10 13:19:38,783 [localhost-startStop-1] WARN org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl.handleException(ExceptionHandlerLoggedImpl.java:27) - GenerationTarget encountered exception accepting command : Error executing DDL via JDBC Statement
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL via JDBC Statement
...
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: There is already an object named 'FKd89jrrin27oevf0olecf2fr7d' in the database.
It complains about tables and FK, even about the table REVINFO with all the envers' history. It never happened with Hibernate 4, even after restoring an existing db. Do you know how to fix it? Is it a bug? I can't crearly delete the tables. The dialect I'm using is org.hibernate.dialect.SQLServer2008Dialect |