Hidden columns
Supported by ❌ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
jOOQ's code generator may decide that a column is hidden, in case of which using it in various DML statements may subtly change. In particular, the column will be excluded by default from all projections, * expansions, meta data queries. The column is still available in generated tables for explicit usage, though:
// UpdatableRecords don't contain the column anymore:
TRecord r1 = create.selectFrom(T).fetchOne();
r1.getInvisible();   // compilation error
// * expansions don't include the column anymore
Record r2 = create.select().from(T).fetchOne();
r2.get(T.INVISIBLE); // throws IllegalArgumentException, the column isn't available
Record r3 = create.select(asterisk()).from(T).fetchOne();
r3.get(T.INVISIBLE); // throws IllegalArgumentException, the column isn't available
// Meta data queries don't produce the column anymore:
assertNull(T.get(T.INVISIBLE));
// However, explicit usage is still possible
create.select(T.ID, T.INVISIBLE, T.VISIBLE)
      .from(T)
      .fetch();
                                        The fact whether data is hidden is governed by the DataType.hidden() flag.
                                    

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