Max Sumrall
Max Sumrall
I've created a simpler example: ``` CREATE TABLE jooq ( id BIGSERIAL PRIMARY KEY, status VARCHAR NOT NULL ) ``` Forced type for the enum converter: ``` tech.picnic.finance.token.data.service.Status true .*\.jooq.status...
Of course it works fine when you get rid of the forced type, e.g. ``` context.select().from(JOOQ).where(JOOQ.STATUS.cast(String.class).eq(DSL.any(COOL.toString()))).fetch(); ``` works without issue.
On closer inspection, the problem occurs only for `VARCHAR` columns. Columns of type `VARCHAR(n)` and `TEXT` column (I'm using PG), don't have any issues. It's just for unbounded `VARCHAR` that...
Ah, I have upgraded to 3.14.4 in my comments from this week, compared to when I first opened the ticket.
Sorry for the confusion, I double checked and indeed I am reproducing this on 3.14.4. (I also noticed the version is in my stacktrace above https://github.com/jOOQ/jOOQ/issues/10695#issuecomment-737352504)
> So, what's the difference between your attempt and mine? :) Do you have time to create an MCVE? https://github.com/jOOQ/jOOQ-mcve Yeah, it looks like our examples are the same :(...
https://github.com/maxsumrall/jOOQ-mcve/commit/63091a7c8119ec345a3fef4ef5737eb1944476d5 The issue appears to be caused by generating the jOOQ code using the DDL Database (H2). When I switch to spinning up a Postgres DB and generating the SQL...
The above is simply because (afaik) H2 does not support unlimited length VARCHAR, so uses this `2147483647` value.
Simply, H2 supports wider varchar types than postgres. But I'm surprised this wouldn't cause problems elsewhere...
I've found a different but related issue: Given two tables with a column `STATUS`, where in table `A` this column is of type `VARCHAR` and in table `B` it's of...