Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation about the nullability of kotlin generated properties in the presence of DEFAULT or IDENTITY expressions #15248

Closed
lukaseder opened this issue Jun 19, 2023 · 0 comments

Comments

@lukaseder
Copy link
Member

This support request re-appears all the time:
#15246

jOOQ's code generator generates nullable properties for columns that are both NOT NULL and have a DEFAULT or IDENTITY expression or some other means of allowing NULL on write. The fact that the property is non-nullable on read isn't sufficient to add a nullability guarantee in generated code. Users may want to support null values when inserting the record, and in that case, the null value is supposed to apply the DEFAULT (given the NOT NULL constraint prevents actually storing the NULL value).

What makes perfect sense after thinking about it a bit more thoroughly seems wrong and/or annoying at first, at the least, it is surprising. Adding additional documentation to this section would help:
https://www.jooq.org/doc/latest/manual/code-generation/kotlingenerator/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

1 participant