hibernate null value is assigned to a property of primitive type setter

数据库表中某一个字段的类型是numeric 我在dao里申明的时候写的是int型 结果在查询的过程中报这样的错误 原来是数据库里这个字段中存在一些 空值。在赋予int时出错,此时要么该null,要么该int 为Integer
原文地址:https://www.cnblogs.com/yuanfuqiang/p/5542877.html