例如,我有一个数据库类型别名,定义如下:
create type aml_acct from varchar(50) not null
然后在用于创建表的SQL中,我将具有这样的列定义:
create table accOUNTS (
.
acct aml_acct,.
)
在3.7.3中,Jooq生成的代码是这样的:
public final TableField<Amlaccountsrecord,String> accT =
createField("acct",org.jooq.impl.SQLDataType.VARCHAR.length(50).nullable(false),this,"");
在3.12.3中,Jooq生成的代码是这样的:
/**
* @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 {@literal <deprecationOnUnknownTypes/>} in your code generator configuration.
*/
@java.lang.Deprecated
public final TableField<Amlaccountsrecord,Object> accT = createField(DSL.name("acct"),org.jooq.impl.SQLDataType.OTHER.nullable(false),"");
但是我不知道如何制作Binding类来使其正确处理aml_acct
数据库类型并像以前一样生成代码。还是有办法用ForcedType
来解决这个问题?
任何想法或帮助将不胜感激...