Note, this is not related to the display width but to the fact that the data type reported here is INT, instead of INTEGER, which is the standard name for 32 bit integers. As a workaround, if you can replace INT(11) by INTEGER(11), or INTEGER, you would get the correct type.
On Thu, Feb 6, 2020 at 11:30 AM <[email protected]> wrote: > Thanks a lot! > > четверг, 6 февраля 2020 г., 13:27:04 UTC+3 пользователь Lukas Eder написал: >> >> Thanks a lot for your report. Looks like a bug. I've created an issue for >> this: >> https://github.com/jOOQ/jOOQ/issues/9797 >> >> On Thu, Feb 6, 2020 at 11:00 AM <[email protected]> wrote: >> >>> Hello. >>> 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 >>> jooq-modelator <https://github.com/ayedo/jooq-modelator>: 3.6.0 >>> MySQL: 5.7 >>> >>> >>> Does someone faced similar issue and know the solution or. at least >>> workarounds? >>> >>> >>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "jOOQ User Group" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/jooq-user/6e94a0e2-f3b2-45e5-993c-968aa663c1bb%40googlegroups.com >>> <https://groups.google.com/d/msgid/jooq-user/6e94a0e2-f3b2-45e5-993c-968aa663c1bb%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- > You received this message because you are subscribed to the Google Groups > "jOOQ User Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jooq-user/9a2995b1-8a2e-4b5f-a9d5-1e64fba1986f%40googlegroups.com > <https://groups.google.com/d/msgid/jooq-user/9a2995b1-8a2e-4b5f-a9d5-1e64fba1986f%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/CAB4ELO4x3FY923menzxh76VHik5a1N7Yauey3%3DZJnkUYH3BDKA%40mail.gmail.com.
