Faced the following issue. When generating jooq classes based on xml file (created with help of
https://github.com/ayedo/jooq-modelator plugin), results in invalid type. For instance:
Column:
<column>
<table_catalog></table_catalog>
<table_schema>SAMPLE</table_schema>
<table_name>TEST</table_name>
<column_name>size</column_name>
<data_type>int(11)</data_type>
<character_maximum_length>0</character_maximum_length>
<numeric_precision>10</numeric_precision>
<numeric_scale>0</numeric_scale>
<ordinal_position>17</ordinal_position>
<is_nullable>true</is_nullable>
<comment></comment>
</column>
Result:
/**
* @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<SerasaNegativeNotationResponseParamsRecord, Object> SIZE = createField(DSL.name("size"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"int(11)\"").nullable(false), this, "");
Instead of
public final TableField<SerasaNegativeNotationResponseParamsRecord, Integer> SIZE = createField(DSL.name("size"), SQLDataType.INTEGER.nullable(false), this, "");
Works just fine with other types, such as bigint etc. Also, works just fine when the source is not xml but MySQL DB.
Environment:
Jooq: 3.12.4