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

简介:

原理如下:

Integer与int的区别: 
Integer是对象.     因此可以为null(对象可以为空.),即property   =   null;      
int   是普通类型, 不可以为null.

数据库中的property是空的,可以映射额外integer类型,但是不能映射为int类型,如果误在实体中将property定义成了int类型,就有可能会出这种错误。       


解决方法:

把数据库中的数据删除,重新录入。

或者



本文转自 潜心笃志 51CTO博客,原文链接:http://blog.51cto.com/82711020/1982263

相关文章
|
8月前
【已解决】TypeError: Cannot destructure property `createHash` of ‘undefined‘ or ‘null‘
【已解决】TypeError: Cannot destructure property `createHash` of ‘undefined‘ or ‘null‘
204 1
|
2天前
键值的 key 和 value 允许为null吗
键值的 key 和 value 允许为null吗
|
2天前
|
PHP
Trying to access array offset on value of type null
你就可以避免在null值上尝试访问数组偏移量的错误。 总的来说,当你遇到这个错误时,你应该回顾你的代码,确保在尝试访问数组偏移量之前,相关的变量已经被正确地初始化为一个数组,并且不是null。
|
7月前
|
JavaScript API
【Vue】Cannot set reactive property on undefined,null,or primitive value:undefined
【Vue】Cannot set reactive property on undefined,null,or primitive value:undefined
109 0
|
2天前
|
Java
Error:(15, 13) java: No property named “id” exists in source parameter(s). Did you mean “null”?
Error:(15, 13) java: No property named “id” exists in source parameter(s). Did you mean “null”?
36 1
|
2天前
|
JavaScript API
Property ‘proxy‘ does not exist on type ‘ComponentInternalInstance | null‘.ts
Property ‘proxy‘ does not exist on type ‘ComponentInternalInstance | null‘.ts
|
5月前
|
存储
HashMap HashTable ConcurrentMap 中key value是否可以为null
HashMap HashTable ConcurrentMap 中key value是否可以为null
42 0
|
2天前
|
机器学习/深度学习 SQL 关系型数据库
【MySQL进阶之路丨第十一篇】一文带你精通MySQL NULL值处理、正则表达式
【MySQL进阶之路丨第十一篇】一文带你精通MySQL NULL值处理、正则表达式
42 0
|
2天前
|
SQL 关系型数据库 MySQL
总结 vue3 的一些知识点:MySQL NULL 值处理
总结 vue3 的一些知识点:MySQL NULL 值处理
|
2天前
|
SQL 关系型数据库 MySQL
MySQL NULL 值处理
MySQL NULL 值处理