vertx-jooq icon indicating copy to clipboard operation
vertx-jooq copied to clipboard

Enum w/ default values codegen broken

Open m1schka opened this issue 6 years ago • 2 comments

in VertxGenerator, you have a fix for Enum default values, which (for me) is broken. It generates:

public final TableField<FooRecord, CustomEnum> MY_COLUMN = createField("my_column", org.jooq.util.postgres.PostgresDataType.VARCHAR.asEnumDataType(my.package.jooq.enums.CustomEnum.class).defaultValue(my.package.jooq.enums.CustomEnum.'DEFAULT_COLUMN_ENUM_VALUE'::schema.custom_enum), this, "");

A proper fix was introduced in upstream jooq in 3.11 but I can't upgrade because the VertxGenerator Class relies on the "old" JavaGenerator class, which is not there in 3.11 (because the packages moved).

Do you have any suggestions for me how to fix it? Otherwise I'll have to remove the default value for the enum

m1schka avatar Aug 29 '18 13:08 m1schka

Which vertx-jooq version you are using? I remember I fixed it but I am not sure if it made it to the 3.x branch. I've been working on vertx-jooq 4 now for quite some time, unfortunately I currently can't find the time to finalize the release however there are beta versions on maven central. https://github.com/jklingsporn/vertx-jooq/tree/release4.0.0

jklingsporn avatar Aug 29 '18 13:08 jklingsporn

I'm on 3.1.0

m1schka avatar Aug 29 '18 14:08 m1schka