【问题标题】:Exclude Column of a certain table in JOOQ code generation?在JOOQ代码生成中排除某个表的列?
【发布时间】:2019-06-23 18:28:38
【问题描述】:

如何使用 JOQQ 代码生成排除某个表中的列? 我在 maven 中有“jooq-codegen-maven”插件的部分:

                <database>
                    <name>org.jooq.meta.mysql.MySQLDatabase</name>
                    <inputSchema>fishes</inputSchema>
                    <includeExcludeColumns>true</includeExcludeColumns>
                    <includes>.*</includes>
                    <excludes>users.type|users.mark</excludes>

                </database>

但是,这不起作用。省略“用户”,它会起作用,但是所有表中的列都会被忽略,这不是我想要的。

【问题讨论】:

    标签: java maven-plugin jooq


    【解决方案1】:

    您必须完全限定一个对象或根本不限定它。所以,写:

    <excludes>fishes\.users\.(type|mark)</excludes>
    

    【讨论】:

    • 酷,它有效,但你知道我在文档中的哪里可以找到它,因为我不清楚。
    • @edbras: Here jooq.org/doc/latest/manual/code-generation/codegen-advanced/… "这些表达式匹配以下任何对象类型,或者通过它们的完全限定名称 (catalog.schema.object_name),或者仅通过它们的名称 (object_name )"
    猜你喜欢
    • 2016-09-04
    • 2022-08-24
    • 2014-09-09
    • 2017-12-03
    • 2017-08-13
    • 2020-01-23
    • 2019-12-21
    • 2014-03-06
    • 2016-01-06
    相关资源
    最近更新 更多