|previous : next|
Applies to ❌ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
There are various reasons why a column could be readonly, including:
- The column is formally marked as
READONLY, if the database product supports this.
- The column is from a view, and either the entire view, or just that particular column is not updatable.
- The user lacks
UPDATEgrants to the column.
- The column is computed using
[ GENERATED ALWAYS ] AS <expression>(
DEFAULTcolumns aren't readonly)
- There is a trigger preventing writing to the column.
jOOQ's code generator can detect some of these, and mark columns as readonly for you, meaning that the column will not be taken into consideration in DML statements, such as INSERT or UPDATE, or UpdatableRecord CRUD calls. To configure the runtime behaviour of such readonly columns, please see the relevant section about readonly columns.
It's also possible to manually mark columns as readonly using the synthetic readonly columns configuration.
readonlyflag is a property of the generated
org.jooq.DataType. As such, the property can only be enforced on expressions which make this flag available to jOOQ. For example, if you're using plain SQL templates without passing along a
readonlyflag enabled, then it cannot be enforced. See also features requiring code generation for more details.