diff options
Diffstat (limited to 'src/com/iciql/util/GenerateModels.java')
-rw-r--r-- | src/com/iciql/util/GenerateModels.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/iciql/util/GenerateModels.java b/src/com/iciql/util/GenerateModels.java index ce98105..1a6270f 100644 --- a/src/com/iciql/util/GenerateModels.java +++ b/src/com/iciql/util/GenerateModels.java @@ -133,7 +133,12 @@ public class GenerateModels { Connection conn = null; try { conn = DriverManager.getConnection(url, user, password); - Db db = Db.open(url, user, password.toCharArray()); + Db db; + if (password == null) { + db = Db.open(url, user, (String) null); + } else { + db = Db.open(url, user, password.toCharArray()); + } DbInspector inspector = new DbInspector(db); List<String> models = inspector.generateModel(schema, table, packageName, annotateSchema, trimStrings); |