From @Column
annotation documentation i verified nullable
attribute has true
as default value.
In my entities definitions I'd like to set columns non-nullable as default behavior, but I don't want to set this for every single column.
Is there a way to globally change default value for nullable
attribute (and eventually others)?
JPA takes the nullable property from the tables on your database if the columns on your table were notnull
then your entity attributes would be @NotNull
too. You could do the changes on your database and recreate the entities.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With