Hello Lukas, :)
I need to set many field, so in my case it's inconvenient to use plain SQL.
As your suggestion, I'll use substring as below. thanks!
String fieldText = String.format("'%s'", text);
create.insertInto(TEST2)
.set(TEST2.B, Factory.substring(Factory.field(fieldText, String.class),
1, 5))
.set(...other....)
.execute();
BTW, I find the number 5 is a magic number. I try to get the column size
from my JOOQ java code, but I can't.
Do I miss or there is no static variable from code generator?
ex: TEST2.B.getSize() ??
Thanks, Lukas.
-Pay