I am using JPADatabase to generate JOOQ classes from my existing JPA entites. From manual, I know that JPADatabase internally uses H2 database to read the meta data schema and generate the code. Due to H2 database has no data type for Numeric, instead it has Decimal. Therefore all my numeric data type are converted to SQLDataType.DECIMAL.
public final TableField<MyTableRecord, BigDecimal> NUM_FIELD = createField(DSL.name("NUM_FIELD"), SQLDataType.DECIMAL, this, "");
I even try to use forcedType to force generate the SQLDataType.NUMERIC when running the code gen, but the result still shows SQLDataType.DECIMAL. And I found it even works for Double, if I put SQLDataType.DOUBLE in the forcedType, but just not work for SQLDataType.NUMERIC.
<forcedTypes>
<forcedType>
<name>NUMERIC</name>
<includeExpression>.*\.num_field</includeExpression>
<includeTypes>.*</includeTypes>
<nullability>ALL</nullability>
<objectType>ALL</objectType>
</forcedType>
</forcedTypes>
Is there any way to make JPADatabase code gen to produce SQLDataType.NUMERIC?