您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

Hibernate 查询数据异常_MySQL

2026/2/14 8:22:31发布17次查看
hibernate
bitscn.comhibernate 查询数据异常 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
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product