为querydsl-maven-plugin设置NamingStrategy

时间:2013-02-10 03:49:29

标签: java mysql maven querydsl

我正在使用querydsl-maven-plugin为Maven中的一堆MySQL表生成实体和bean。

有没有办法告诉插件生成,例如OriginalNamingStrategy而不是DefaultNamingStrategy

目前的评论似乎表明只有以下选项。我似乎无法在源代码中找到设置NamingStrategy的任何内容,但如果可能的话,我会非常感激。

<!--
    optional elements :      
    * jdbcUser = connection user
    * jdbcPassword = connection password
    * namePrefix = name prefix for generated query classes (default: Q)
    * schemaPattern = ant style pattern to restrict code generation to certain schemas (default: null)
    * tableNamePattern = ant style pattern to restrict code generation to certain tables (default: null)
    * exportBeans = set to true to generate beans as well, see section 2.14.13 (default: false)
    * innerClassesForKeys = set to true to generate inner classes for keys (default: false)
    * validationAnnotations = set to false to disable serialization of validation annotations (default: true)
-->   

1 个答案:

答案 0 :(得分:1)

签出这段代码后,我意识到你可以设置namingStrategyClass属性(没有记录。)

https://github.com/mysema/querydsl/blob/master/querydsl-maven-plugin/src/main/java/com/mysema/query/maven/AbstractMetaDataExportMojo.java