jOOQ代码生成Keys.java成员排序

时间:2016-04-26 16:33:54

标签: code-generation jooq

对于给定的jOOQ Maven代码生成:

<profile>
    <id>code-generation</id>
    <build>
        <plugins>
            <plugin>
                <groupId>org.jooq</groupId>
                <artifactId>jooq-codegen-maven</artifactId>
                <version>${jooq.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.postgresql</groupId>
                        <artifactId>postgresql</artifactId>
                        <version>9.4-1200-jdbc41</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <jdbc>
                        <driver>org.postgresql.Driver</driver>
                        <url>${postgres.connection_string}</url>
                        <user>${postgres.user}</user>
                        <password></password>
                    </jdbc>
                    <generator>
                        <name>org.jooq.util.JavaGenerator</name>
                        <database>
                            <name>org.jooq.util.postgres.PostgresDatabase</name>
                            <includes>.*</includes>
                            <excludes></excludes>
                            <inputSchema>public</inputSchema>
                        </database>
                        <target>
                            <packageName>${packagename_123}</packageName>
                            <directory>src/main/java/</directory>
                        </target>
                    </generator>
                </configuration>
            </plugin>
        </plugins>
    </build>
</profile>

生成的Keys.java在我的本地开发人员计算机上生成以下内容:

public static final UniqueKey<BillItemRecord> BILL_ITEM_PKEY = UniqueKeys0.BILL_ITEM_PKEY;

public static final UniqueKey<BillingHistoryRecord> BILLING_HISTORY_PKEY = UniqueKeys0.BILLING_HISTORY_PKEY;

在我的CI机器上,相同的Keys.java文件按相反的顺序对两行进行了排序:

public static final UniqueKey<BillingHistoryRecord> BILLING_HISTORY_PKEY = UniqueKeys0.BILLING_HISTORY_PKEY;

public static final UniqueKey<BillItemRecord> BILL_ITEM_PKEY = UniqueKeys0.BILL_ITEM_PKEY;

为什么这两行的排序方式不同?

0 个答案:

没有答案