We use JOOQ code generation which works like a charm. For 99% of our use cases we simply reuse DAOs generated by JOOQ. For one usecase we need to use transactions.
I am looking at other questions such as the one here JOOQ & transactions and using JOOQ transactions to insert rows into two tables as a transaction. The tables are quite big with 15+ columns and I am thinking if there is a better way to do this other than
DSL.using(configuration)
.transaction(ctx -> {
DSL.using(ctx)
.update(TABLE)
.set(TABLE.COL, newValue)
.where(...)
.execute();
});
Specifying the 15 columns seems like a lot of work which has to be redone when new columns etc are added. We already have POJOs is there any way to simply convert POJO into a record and simply using the DSL syntax.