There is a requirement to have a Postgres table with multiple columns to store audit records.
The table has an Id column populated using autogenerator from sequence(hibernate) for every save. For some purpose, there is a need to have another non-null column added to the table with DEFAULT value as copy of the value from autogenerated Id column (but also allows taking the value when explicitly set).
Found few suggestions - PostgreSQL - set a default cell value according to another cell value , still would like to explore if this can be handled at hibernate/Spring JPA level OR even at column definition level?