From 7d935b61a3d80260b9cacf959984e14708c3a96b Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Wed, 18 Sep 2013 18:15:38 +0200 Subject: [PATCH] No configuration for hibernate.dialect might be a valid configuration too --- .../juplo/plugins/hibernate4/Hbm2DdlMojo.java | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java b/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java index 6c4c31a4..5c3b5c7e 100644 --- a/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java +++ b/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java @@ -552,15 +552,27 @@ public class Hbm2DdlMojo extends AbstractMojo getLog().debug("SQL-dialect unchanged."); else { - getLog().debug("SQL-dialect changed: " + dialect); modified = true; - md5s.put(DIALECT, dialect); + if (dialect == null) + { + getLog().debug("SQL-dialect was unset."); + md5s.remove(DIALECT); + } + else + { + getLog().debug("SQL-dialect changed: " + dialect); + md5s.put(DIALECT, dialect); + } } } else { - modified = true; - md5s.put(DIALECT, properties.getProperty(DIALECT)); + String dialect = properties.getProperty(DIALECT); + if (dialect != null) + { + modified = true; + md5s.put(DIALECT, properties.getProperty(DIALECT)); + } } /** The generated SQL varies with the envers-configuration */ -- 2.20.1