なぜなら、複数のJavaエラーの自動生成JOOQコードをコンパイルすることはできません

トビアス・マーシャル:

私が使用java --add-modules java.xml.bind -classpath jooq-3.11.3.jar;jooq-meta-3.11.3.jar;jooq-codegen-3.11.3.jar;postgresql-42.2.4.jar;. org.jooq.codegen.GenerationTool jooq.xml私のPostgreSQLの10のためにJOOQコードを自動生成するUSERテーブル。

pgadmin4_2018-07-24_08-08-49

コード生成ツールは、自動生成されたコード内のいくつかのJava構文エラーがあるので、成功したが、私のプログラムwon'tのコンパイルを終了します。

いくつかの例:

PgClass.java

/**
* @deprecated Unknown data type. Please define an explicit {@link org.jooq.Binding} to specify how this type should be handled. Deprecation can be turned off using <deprecationOnUnknownTypes/> in your code generator configuration.
*/
@java.lang.Deprecated
public final TableField<PgClassRecord, Object> RELPARTBOUND = createField("relpartbound", , this, "");

idea64_2018-07-24_08-12-48

コンパイラは私に言っています java: illigal start of expression

PgIndex.java:

/**
* The column <code>pg_catalog.pg_index.indoption</code>.
*/
public final TableField<PgIndexRecord, Object[]> INDOPTION = createField("indoption", .getArrayDataType(), this, "");

idea64_2018-07-24_08-15-31

コンパイラは私に言っています java: as of release 8, 'this' is allowed as the parameter name for the receiver type only, which has to be the first parameter

EDIT:

jooq.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configuration xmlns="http://www.jooq.org/xsd/jooq-codegen-3.11.0.xsd">
  <jdbc>
    <driver>org.postgresql.Driver</driver>
    <url>jdbc:postgresql://localhost:5432/timecoder-api-dev</url>
    <user>postgres</user>
    <password></password>
  </jdbc>

  <generator>
    <database>
      <name>org.jooq.meta.postgres.PostgresDatabase</name>
      <includes>.*</includes>
    </database>
    <target>
      <packageName>persistence.database.generated</packageName>
      <directory>K:\Data\Dev\Git\timecoder-api\src</directory>
    </target>
  </generator>
</configuration>
  • jOOQ:3.11.3
  • Javaの:1.8.0_181
  • データベース(ベンダーを含める):PostgreSQLの10
  • OS:Windowsの10

私はまた、GitHubの上で問題を作成しました:https://github.com/jOOQ/jOOQ/issues/7684

ルーカス・エダー:

報告いただきありがとうございます。:これはコード・ジェネレータのバグですhttps://github.com/jOOQ/jOOQ/issues/7692

それはjOOQ 3.12.0と3.11.4で修正されます

おすすめ

転載: http://43.154.161.224:23101/article/api/json?id=187979&siteId=1
おすすめ