org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of com.xuguang.u8.otheroutsheet.bean.OtherOutSheetItem.unitCost
原因hibernate不能将null值映射成double
办法把OtherOutSheetItem的属性unitCost声明为Double
原因hibernate不能将null值映射成double
办法把OtherOutSheetItem的属性unitCost声明为Double
本文解决了一个Hibernate在尝试将null值映射到一个原始类型的setter方法(com.xuguang.u8.otheroutsheet.bean.OtherOutSheetItem.unitCost)时抛出的PropertyAccessException异常。解决方案是将unitCost属性类型从double更改为Double。
1837

被折叠的 条评论
为什么被折叠?



