Available in versions: Dev (3.22) | Latest (3.21) | 3.20 | 3.19 | 3.18 | 3.17 | 3.16 | 3.15 | 3.14 | 3.13 | 3.12
This documentation is for the unreleased development version of jOOQ. Click on the above version links to get this documentation for a supported version of jOOQ.
CRUD: Update
Supported by ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
Calling UpdatableRecord.update() will execute the same logic as store(), but will enforce the UPDATE behaviour regardless if the record was previously fetched from the database or not.
// Create a new record BookRecord book = create.newRecord(BOOK); // Set the primary key value of the record, but exclude it from the UPDATE .. SET clause book.setId(1); book.touched(false); // Update the record: UPDATE BOOK SET PUBLISHED_IN = 1984 WHERE ID = :id book1.setPublishedIn(1948); book1.update();
Feedback
Do you have any feedback about this page? We'd love to hear it!