Files
spring-soap/spring-boot-rest/src/main/java/com/baeldung/persistence/config/CustomH2Dialect.java
kwoyke 76041fcda9 BAEL-3801: Update spring-boot-rest to use latest Spring Boot version (#8740)
* BAEL-3801: Upgrade to Spring Boot 2.2.2

* BAEL-3801: Fix JacksonMarshaller

* BAEL-3801: Get rid of deprecated HATEOAS classes

* BAEL-3801: Fix H2 tables drop order

* BAEL-3801: Remove commented property from pom.xml
2020-02-19 22:36:27 +01:00

27 lines
817 B
Java

package com.baeldung.persistence.config;
import org.hibernate.dialect.H2Dialect;
/**
* Since H2 1.4.200. the behavior of the drop table commands has changed.
* Tables are not dropped in a correct order.
* Until this is properly fixed directly in Hibernate project,
* let's use this custom H2Dialect class to solve this issue.
*
* @see <a href="https://hibernate.atlassian.net/browse/HHH-13711">https://hibernate.atlassian.net/browse/HHH-13711</a>
* @see <a href="https://github.com/hibernate/hibernate-orm/pull/3093">https://github.com/hibernate/hibernate-orm/pull/3093</a>
*/
public class CustomH2Dialect extends H2Dialect {
@Override
public boolean dropConstraints() {
return true;
}
@Override
public boolean supportsIfExistsAfterAlterTable() {
return true;
}
}