jpa 中怎么给一个字段附上默认值(用注解或则是写java 语句)
比如,我现在写一个表其中这么个字段。。。@Column(name="IS_DELETE")publicbooleanisDelete(){returnisDelete;}...
比如,我现在写一个表其中这么个字段。。。
@Column(name = "IS_DELETE")
public boolean isDelete() {
return isDelete;
}
public void setDelete(boolean isDelete) {
this.isDelete = isDelete;
}
怎么让IS_DELETE这个字段默认是 true 展开
@Column(name = "IS_DELETE")
public boolean isDelete() {
return isDelete;
}
public void setDelete(boolean isDelete) {
this.isDelete = isDelete;
}
怎么让IS_DELETE这个字段默认是 true 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询