Available in versions: Dev (3.20)

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.

Hidden columns

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

A column may be hidden from queries by marking it as such in a forced type:

XML (standalone and maven)
Programmatic
Gradle (Kotlin)
Gradle (Groovy)
Gradle (third party)
<configuration>
  <generator>
    <database>
      <forcedTypes>
        <forcedType>
          <hidden>true</hidden>
          <includeExpression>(?i:CREATED|MODIFIED)_(?i:AT|BY)</includeExpression>
        </forcedType>
      </forcedTypes>
    </database>
  </generator>
</configuration>

See the configuration XSD, standalone code generation, and maven code generation for more details.

new org.jooq.meta.jaxb.Configuration()
  .withGenerator(new Generator()
    .withDatabase(new Database()
      .withForcedTypes(
        new ForcedType()
          .withHidden(true)
          .withIncludeExpression("(?i:CREATED|MODIFIED)_(?i:AT|BY)")
      )
    )
  )

See the configuration XSD and programmatic code generation for more details.

import org.jooq.meta.jaxb.*


configuration {
  generator {
    database {
      forcedTypes {
        forcedType {
          isHidden = true
          includeExpression = "(?i:CREATED|MODIFIED)_(?i:AT|BY)"
        }
      }
    }
  }
}

See the configuration XSD and gradle code generation for more details.

configuration {
  generator {
    database {
      forcedTypes {
        forcedType {
          hidden = true
          includeExpression = "(?i:CREATED|MODIFIED)_(?i:AT|BY)"
        }
      }
    }
  }
}

See the configuration XSD and gradle code generation for more details.

generationTool {
  generator {
    database {
      forcedTypes {
        forcedType {
          hidden = true
          includeExpression = "(?i:CREATED|MODIFIED)_(?i:AT|BY)"
        }
      }
    }
  }
}

See the configuration XSD and gradle code generation for more details.

It may be useful to also change the generated visibility of a hidden column.

References to this page

Feedback

Do you have any feedback about this page? We'd love to hear it!

The jOOQ Logo