If you wanted it to be 1, why did you defined it as 0 in the column definition?
Code:
columnDefinition = "int default 0
If you want it to be 1, then just initialize it as 1:
Code:
@Column(name="value", nullable = false)
private int value = 1;
Hibernate will use the value of 1 if you don't overwrite it. If you are using
@DynamicUpdate, then you need a SQL-level DEFAULT value as well.
If you are using hbm2ddl, then the column definition should be: INT NOT NULL DEFAULT 1
Code:
@Column(name="value", nullable = false, columnDefinition="INT NOT NULL DEFAULT 1")
private int value = 1;
However, you need to make sure that the database supports the INT type too.