My question:
Since Jooq start to support json/jsonb database type from v3.12, I have to update my custom Json type bindings from
public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> { ... }
to
public class PostgresJSONGsonBinding implements Binding<JSONB, JsonElement> { ... }
because the codegen Tables changed from
public final TableField<BookRecord, JsonNode> EXTRA = createField("extra", org.jooq.impl.DefaultDataType.getDefaultDataType("\"pg_catalog\".\"jsonb\""), this, "", new JsonbBinding());
to
public final TableField<BookRecord, JsonNode> EXTRA = createField(DSL.name("extra"), org.jooq.impl.SQLDataType.JSONB, this, "", new JsonbBinding());
In pre-3.12 way my custom Bindings could accept any type of object and convert it to JsonNode, but now it accept JSONB type only. It causes all of my previous Type to Record conversions broken.
Is there any way to tell jooq codegen accept Object type but not just JSONB type since v3.12?
My codegen config:
forcedTypes {
forcedType {
userType = 'com.fasterxml.jackson.databind.JsonNode'
binding = 'com.laxture.lolth.jooq.binding.JsonbBinding'
types = 'jsonb'
}
}
Versions:
BTW, the document custom binding demonstrations (here and here) are still using Object, it should need to be updated accordingly I guest:)
My question:
Since Jooq start to support
json/jsonbdatabase type from v3.12, I have to update my custom Json type bindings fromto
because the codegen
Tableschanged fromto
In pre-3.12 way my custom Bindings could accept any type of object and convert it to
JsonNode, but now it acceptJSONBtype only. It causes all of my previousTypetoRecordconversions broken.Is there any way to tell jooq codegen accept
Objecttype but not justJSONBtype since v3.12?My codegen config:
Versions:
BTW, the document custom binding demonstrations (here and here) are still using
Object, it should need to be updated accordingly I guest:)