1

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

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

当前的评论似乎表明只有以下选项。我似乎无法在源代码中找到任何设置 aNamingStrategy但如果可能的话将不胜感激。

<!--
    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)
-->   
4

1 回答 1

1

在检查了这段代码之后,我意识到你可以只设置namingStrategyClass属性(它没有记录。)

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

于 2013-02-10T04:09:29.150 回答