It seems that MySQL and PostgreSQL act differently if null values are provided for default (defined in the db) columns on insert: the former uses the default whereas the latter inserts the null.
This is a problem for reveng-generated classes because a .save() passes all columns to an insert including the null ones.
On looking for a solution I found the suggestion of @Column(insertable = false)
but reveng doesn’t set that.
Does that sound like the correct solution?
Is there a reason reveng doesn’t do it already?
Would it be straightforward to add it, assuming the metadata contains default information?
Even then I’m not sure if this would want to be applied globally, nobody would ever be able to set any default columns on insert.
OK. Where’s the best place to discuss the right way to do things beforehand?
For example, the configuration question.
Also, BasicColumnProcessor.java has reading the default value commented out with TODO: only read if have a way to avoid issues with clobs/lobs and similar