All versions: 3.11 | 3.10 | 3.9 | Development versions: 3.12

jOOQ's org.jooq.UpdatableRecord supports an optimistic locking feature, which can be enabled in the code generator by specifying a regular expression that defines such a record's version and/or timestamp fields. These regular expressions should match at most one column per table, again either by their fully qualified names (catalog.schema.table.column_name) or by their names only (column_name):

XML configuration (standalone and Maven)

<configuration xmlns="">

Programmatic configuration

  .withGenerator(new Generator(
    .withDatabase(new Database()

Gradle configuration

myConfigurationName(sourceSets.main) {
  generator {
    database {
      recordVersionFields = 'REC_VERSION'
      recordTimestampFields = 'REC_TIMESTAMP'

Note again that these expressions are regular expressions with default flags

The jOOQ Logo