If a generated/computed column is marked as such using databaseGenerated(), but it is also nullable(), an exception is thrown even when the field is correctly excluded from an insert() block.
This occurs because a NULL value is still being auto-included for that column in the prepared insert statement.
Additional:
Add isDatabaseGenerated property to places where Column is copied, so that, for example, switching the chain order leads to equivalent results: .nullable().databaseGenerated() vs .databaseGenerated().nullable()
If a generated/computed column is marked as such using
databaseGenerated()
, but it is alsonullable()
, an exception is thrown even when the field is correctly excluded from aninsert()
block.This occurs because a NULL value is still being auto-included for that column in the prepared insert statement.
Additional:
isDatabaseGenerated
property to places whereColumn
is copied, so that, for example, switching the chain order leads to equivalent results:.nullable().databaseGenerated()
vs.databaseGenerated().nullable()