Null value was assigned to a property of primitive type setter of com.entity……

错误提示:
Null value was assigned to a property of primitive type setter of com.entity.hs.HSNotice……

解决办法:
Hibernate中配置的对象,所有的属性类型必须是对象类型。
如:
@Column(name="id",length=32)
private int id;//id
得改成:
@Column(name="id",length=32)
private Integer id;//id


一般出现的问题解决把
int修改为其包装类型Integer;
float修改为其包装类型Float;
……

你可能感兴趣的:(TO,TO,null,null,null,type,property,property,WAS,WAS,WAS,value,value,value,setter,Primitive,of,of,a,a,assigned,assigned,assigned)