I am trying to run some Hibernate/JPA examples using an in-memory HSQL DB. The error message I get is the following:
13:54:21,427 ERROR SchemaExport:425 - HH
The Solution @Sander provided above works for MYSQL too. Just extend MySQL5InnoDBDialect instead like below:
import org.hibernate.dialect.MySQL5InnoDBDialect;
public class ImprovedMySQLDialect extends MySQL5InnoDBDialect {
@Override
public String getDropSequenceString(String sequenceName) {
// Adding the "if exists" clause to avoid warnings
return "drop sequence if exists " + sequenceName;
}
@Override
public boolean dropConstraints() {
// We don't need to drop constraints before dropping tables, that just leads to error
// messages about missing tables when we don't have a schema in the database
return false;
}
}
Then in your datasource file change the following line:
dialect = org.hibernate.dialect.MySQL5InnoDBDialect
to
dialect = my.package.name.ImprovedMySQLDialect