Skip to content
This repository was archived by the owner on Apr 4, 2020. It is now read-only.

全スキーマのテーブル情報クラスが生成されてします #74

@ishizukayusuke

Description

@ishizukayusuke

schemaNameオプションを指定しても、指定していないスキーマに属するテーブル情報が出力されてしまいます。

また、showSchemaName: trueを指定しても、出力されるエンティティクラスにスキーマ名が記載されていません。

スキーマ情報が取れていない(?)のかなと思います。
gradlewからの実行です。
java 1.8
mysql 5.7
Gradle 5.3

dependencies {
    domaGenRuntime 'org.seasar.doma:doma-gen:2.19.3'
    domaGenRuntime 'mysql:mysql-connector-java:8.0.13'
}

def basePackage = 'aaaaaaaaaaaaaaaaa'
def resourceDir = 'aaaaaaaaaaaaaaaaa'

task domaGen doLast {

    ant.taskdef(resource: 'domagentask.properties', classpath: configurations.domaGenRuntime.asPath)
    ant.gen(
            dialectName: "mysql"
            , driverClassName: "com.mysql.cj.jdbc.Driver"
            , schemaName : "xxxx"
            , url: "jdbc:mysql://127.0.0.1:3306/xxxx?useSSL=false&useUnicode=true&characterEncoding=utf8&nullNamePatternMatchesAll=true"
            , user: "root"
            , password: ""
            , templatePrimaryDir: "${resourceDir}/config/doma/templates"
            , ignoredTableNamePattern: "(sys_config") {
                entityConfig(
                        overwrite: "true"
                        , packageName: "${basePackage}.entity"
                        , useListener: "false"
                        , useAccessor: false
                        , entityPropertyClassNamesFile: "${resourceDir}/config/domagen/entityPropertyClassNameFile.properties"
                        , showSchemaName: true
                )
                daoConfig(
                        overwrite: "false"
                        , packageName: "${basePackage}.repository"
                )
                sqlConfig(
                        overwrite: "false"
                )
            }
}

この場合「xxxx」以外のスキーマ「yyyy」「zzzz」のエンティティ・リポジトリクラスが出力されます

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions