我是靠谱客的博主 单纯冥王星,这篇文章主要介绍org.hibernate.PropertyAccessException: IllegalArgumentException occurred while calling setter of comHTTP Status 500 - Request processing failed; nested exception is org.hibernate.PropertyAccessException: IllegalArgumentException occurred while callin,现在分享给大家,希望可以做个参考。
HTTP Status 500 - Request processing failed; nested exception is org.hibernate.PropertyAccessException: IllegalArgumentException occurred while calling setter of com.hr.manage.po.Employee.serialNumber



用hibernate查出数据,但是类型不是原来的类型怎么办,新增的实体类还用不用,答案是可以用的.用query.setResultTransformer(Transformers.aliasToBean(AA.class));这种形式可以解决查出来的数据不能使用的问题.
需要注意的!!!
(1)这种转换实体类很严格,必须连属性名字要和数据库字段高度一致(注解此时没很大作用用.
(2)实体类可以比表字段少一些字段.
(1)这种转换实体类很严格,必须连属性名字要和数据库字段高度一致(注解此时没很大作用用.
(2)实体类可以比表字段少一些字段.
最后
以上就是单纯冥王星最近收集整理的关于org.hibernate.PropertyAccessException: IllegalArgumentException occurred while calling setter of comHTTP Status 500 - Request processing failed; nested exception is org.hibernate.PropertyAccessException: IllegalArgumentException occurred while callin的全部内容,更多相关org.hibernate.PropertyAccessException:内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复