Mark E Hansen wrote:
benjamin muktesh wrote:You can also do the following:
@Column(columnDefinition = "VARCHAR(12) DEFAULT 'NEW'", name = "status", nullable = false)
In that case, aren't you configuring the default on the database column, not on the class itself. This assumes the database supports a default, right? Also the value wouldn't be assigned until after the new record was saved in the database.