I think that's a limitation of the query you're running. If you want to do all this in one operation you may want to look at using upserts.
https://dev.mysql.com/doc/refman/8.0/en/insert-on-duplicate.html I'm not sure if your version of MySQL supports this but otherwise you are forced to do a select otherwise. I'm not 100% sure on the MySQL syntax jooq pattern to use, but something like this should work. Record result = dslContext.insertInto(record.getTable()) .set(record) .onDuplicateKeyUpdate() .set(record) .returning(record.field1()) .fetchOne(); long id = result.getId(); On Thu, Aug 30, 2018 at 5:12 AM Marcus Gattinger <[email protected]> wrote: > BTW: Im using Record.store() to insert new rows to the table. > > -- > 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]. > For more options, visit https://groups.google.com/d/optout. > -- Thank you Samir Faci https://keybase.io/csgeek -- 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]. For more options, visit https://groups.google.com/d/optout.
