我是靠谱客的博主 要减肥黄蜂,这篇文章主要介绍hibernate 存储int 类型的数据出错,现在分享给大家,希望可以做个参考。

Caused by: java.lang.IllegalArgumentException: Can not set int field net.cedu.entity.crm.MqMessageRecord.feePaymentDetaileId to null value
    at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)
    at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)
    at sun.reflect.UnsafeIntegerFieldAccessorImpl.set(Unknown Source)
    at java.lang.reflect.Field.set(Unknown Source)
    at org.hibernate.property.DirectPropertyAccessor$DirectSetter.set(DirectPropertyAccessor.java:79)

    ... 39 more



出了这个错误,很纠结不知道为什么。最后是先在数据库写好,然后查出对象来,在更新对象。

最后

以上就是要减肥黄蜂最近收集整理的关于hibernate 存储int 类型的数据出错的全部内容,更多相关hibernate内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(102)

评论列表共有 0 条评论

立即
投稿
返回
顶部