【发布时间】:2016-01-06 22:19:50
【问题描述】:
我试图排除使用 TypeSafe Config 时由 Liquibase 创建的两个表。
jooq {
# databasechangelog = Liquibase generated tables
# databasechangeloglock = Liquibase generated tables
excludes = "databasechangelog, databasechangeloglock"
}
当我只提供一个排除项时,例如"databsechangelog",它可以工作。
多个排除项应以逗号分隔 (http://www.jooq.org/doc/2.6/manual/code-generation/codegen-configuration/),但它会生成两个表。
也不允许这样做。
excludes = "databasechangelog", "databasechangeloglock"
在库内部,它的简化调用(注意:getExcludes 是 String)
database.setExcludes(new String[]{StringUtils.defaultString(d1.getExcludes())});
还有其他人遇到过这个问题吗?
这是我的代码生成
new GenerationTool {
setConnection(connection)
run(new Configuration {
withGenerator(new Generator {
withName(config.jooq.generatorClass)
withDatabase(new org.jooq.util.jaxb.Database {
withIncludes(config.jooq.includes)
withExcludes(config.jooq.excludes)
withInputSchema(config.jooq.inputSchema)
withName(config.jooq.databaseClass)
})
withTarget(new Target {
withPackageName(config.jooq.pkg)
withDirectory(config.jooq.directory)
})
withGenerate(new Generate {
setDaos(true)
})
})
})
}
【问题讨论】:
标签: code-generation jooq typesafe-config jooq-sbt-plugin