@Override
@SuppressWarnings("rawtypes")
public PersistenceUnitCommon configure(PersistenceUnitCommon unit, JPADataSource ds, Project project)
{
unit.excludeUnlistedClasses(Boolean.FALSE);
PropertiesCommon properties = unit.getOrCreateProperties();
properties.createProperty().name("hibernate.hbm2ddl.auto").value("create-drop");
properties.createProperty().name("hibernate.show_sql").value("true");
properties.createProperty().name("hibernate.format_sql").value("true");
properties.createProperty().name("hibernate.transaction.flush_before_completion").value("true");
if (!DatabaseType.DEFAULT.equals(ds.getDatabase()))
{
String dialect = DIALECTS.get(ds.getDatabase());
properties.createProperty().name("hibernate.dialect").value(dialect);
}
return unit;
}