Hibernate查询数据异常_MySQL:Hibernate bitsCN.com Hibernate 查询数据异常 Null value was assigned to a property of primitive type setter of com.chwl.model.Content.score原因是score字段定义为int类型,而默认值为null。在java里int类型是不能为
导读Hibernate查询数据异常_MySQL:Hibernate bitsCN.com Hibernate 查询数据异常 Null value was assigned to a property of primitive type setter of com.chwl.model.Content.score原因是score字段定义为int类型,而默认值为null。在java里int类型是不能为
Hibernate
bitsCN.com
Hibernate 查询数据异常 Null value was assigned to a property of primitive type setter of com.chwl.model.Content.score
原因是score字段定义为int类型,而默认值为null。
在java里int类型是不能为null的,所以把默认值设为0就可以了。
修改mysql数据库某个字段默认值的方法: update content set score = '0';
bitsCN.com
Hibernate查询数据异常_MySQL
Hibernate查询数据异常_MySQL:Hibernate bitsCN.com Hibernate 查询数据异常 Null value was assigned to a property of primitive type setter of com.chwl.model.Content.score原因是score字段定义为int类型,而默认值为null。在java里int类型是不能为