Reputation: 43
I am trying to create a column in the database and set default value as a 1 bit(0/1).But when hibernate is run the column is created and null is populated for already created records. Is there any specific annotation or a method in hibernate to populate values?
Upvotes: 1
Views: 31
Reputation: 301
Can you try with below code
@Column(name="columnName", columnDefinition="default '<defaultValue>'")
private String columnName;}
Upvotes: 1