JetBrains / Exposed

Kotlin SQL Framework
http://jetbrains.github.io/Exposed/
Apache License 2.0
8.28k stars 690 forks source link

fix: EXPOSED-292 Explicit nulls in insert with databaseGenerated() #1993

Closed bog-walk closed 7 months ago

bog-walk commented 7 months ago

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: