java - return id in ON DUPLICATE KEY in JOOQ -
what want write next query in jooq:
stmt = connection.preparestatement( "insert `tbl` (`name`, `service_id`, `device_id`) values (?, ?, ?) on duplicate key update `id` = last_insert_id(`id`)", statement.return_generated_keys );
i'm not able find way in jooq. possible?
currently (as of jooq 3.4-3.6), that's not possible due flaw in jooq's insert
api:
java mysql jooq on-duplicate-key
No comments:
Post a Comment