@Column.columnDefinitionused during the DDL phase to create your table and NOT during normal program operation; you will probably have to work with @DynamicInsert/@DynamicUpdate: these annotations insert (or update) only those properties that you set in the POJO, and allow RDBMS to manage other fields.
A small example
@Entity
class MyTable {
@Id
private int code;
@Column(name = "SourceFrom", columnDefinition = "varchar(15) default 'Case'")
private String sourceFrom;
}
and this is the generated code from the DDL phase
create table mytable (code integer not null,SourceFrom varchar(15) default 'Case')
MyTable t = new MyTable();
t.setCode(10);
session.save(t);
will make this statement
insert into mytable (code, SourceFrom) values (10,NULL)
MyTable t = new MyTable();
t.setCode(10);
t.setSourceFrom("MANUAL INSERT");
session.save(t);
will make this statement
insert into mytable (code, SourceFrom) values (10,'MANUAL INSERT')
MyTable @DynamicInsert,
insert into mytable (code) values (10)
, SourceFrom , , , ('Case').
( , @PrePersist ) - .