Null value was assigned to a property of primitive type setter of。

Posted wensy

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Null value was assigned to a property of primitive type setter of。相关的知识,希望对你有一定的参考价值。

前段时间,写了个方法,测试的时候报错了。Null value was assigned to a property of primitive type setter of。百度了一下,发现是hibernate的问题。sqlserver数据库中,字段类型为float,类中用float类型,那么,hibernate不允许数据库中的这个字段值为null。

解决方法:类中字段类型改为 Float 类型--float的封装类。 

以上是关于Null value was assigned to a property of primitive type setter of。的主要内容,如果未能解决你的问题,请参考以下文章

org.hibernate.PropertyAccessException:Null value was assigned to a property of primitive type setter

Null value was assigned to a property of primitive type setter of

hibernate.PropertyAccessException: Null value was assigned to a property of primitive type

Null value was assigned to a property of primitive type setter of。

null value was assigned to a property of primitive type setter of原因解决方法

[转]Null value was assigned to a property of primitive type setter of"原因及解决方法