Permalink
Browse files

Hardcode ignoreInvalidDefaults to true

ignoreInvalidDefaults is hardcoded to true in the main method.
Also, the default values for the ignoreInvalidDefaults parameters on
the methods set to be true.
  • Loading branch information...
1 parent 721938d commit 528eb170c7d94a986e1ff360a56a6ca7eea3a6b9 @Sumith1896 Sumith1896 committed Feb 4, 2016
Showing with 3 additions and 3 deletions.
  1. +3 −3 slick-codegen/src/main/scala/slick/codegen/SourceCodeGenerator.scala
@@ -73,7 +73,7 @@ object SourceCodeGenerator {
} finally db.close
}
- def run(uri: URI, outputDir: Option[String], ignoreInvalidDefaults: Boolean = false): Unit = {
+ def run(uri: URI, outputDir: Option[String], ignoreInvalidDefaults: Boolean = true): Unit = {
val dc = DatabaseConfig.forURI[JdbcProfile](uri)
val pkg = dc.config.getString("codegen.package")
val out = outputDir.getOrElse(dc.config.getStringOr("codegen.outputDir", "."))
@@ -91,9 +91,9 @@ object SourceCodeGenerator {
case uri :: outputDir :: Nil =>
run(new URI(uri), Some(outputDir))
case profile :: jdbcDriver :: url :: outputDir :: pkg :: Nil =>
- run(profile, jdbcDriver, url, outputDir, pkg, None, None, false)
+ run(profile, jdbcDriver, url, outputDir, pkg, None, None, true)
case profile :: jdbcDriver :: url :: outputDir :: pkg :: user :: password :: Nil =>
- run(profile, jdbcDriver, url, outputDir, pkg, Some(user), Some(password), false)
+ run(profile, jdbcDriver, url, outputDir, pkg, Some(user), Some(password), true)
case profile:: jdbcDriver :: url :: outputDir :: pkg :: user :: password :: ignoreInvalidDefaults :: Nil =>
run(profile, jdbcDriver, url, outputDir, pkg, Some(user), Some(password), ignoreInvalidDefaults.toBoolean)
case _ => {

0 comments on commit 528eb17

Please sign in to comment.