New versions: Dev (3.14) | Latest (3.13) | 3.12 | 3.11 | 3.10 | 3.9

Include object types

Applies to ✅ Open Source Edition   ✅ Express Edition   ✅ Professional Edition   ✅ Enterprise Edition

Sometimes, you want to generate only tables. Or only routines. Or you want to exclude them from being generated. Whatever the use-case, there's a way to do this with the following, additional includes flags:

XML configuration (standalone and Maven)

<configuration xmlns="">

Programmatic configuration

new org.jooq.meta.jaxb.Configuration()
  .withGenerator(new Generator(
    .withDatabase(new Database()

Gradle configuration

myConfigurationName(sourceSets.main) {
  generator {
    database {
      includeTables = true
      includeRoutines = true
      includeTriggerRoutines = false
      includePackages = true
      includePackageRoutines = true
      includePackageUDTs = true
      includePackageConstants = true
      includeUDTs = true
      includeSequences = false
      includePrimaryKeys = false
      includeUniqueKeys = false
      includeForeignKeys = false
      includeCheckConstraints = false
      includeIndexes = false

By default, most of these flags are set to true, with the exception of:

  • includeTriggerRoutines: Some databases store triggers as special ROUTINE types in the schema. These routines are not meant to be called directly, by clients, which is why their inclusion in code generation is undesirable.
The jOOQ Logo