解决org.hibernate.HibernateException: identifier of an insta
发布时间:2020-12-14 06:26:33 所属栏目:Java 来源:网络整理
导读:错误信息 严重: Servlet.service() servlet [springmvc] in context with path [/order] threw exception [Request processing failed; nested exception is org.hibernate.HibernateException: identifier of an instance of com.ahd.entity.Order was alte
错误信息 严重: Servlet.service() servlet [springmvc] in context with path [/order] threw exception [Request processing failed; nested exception is org.hibernate.HibernateException: identifier of an instance of com.ahd.entity.Order was altered from 6 to 06 to 08519014721999
出现原因: 1. eg. 映射文件中id的类型是Integer,也就是int类型的,而实体类中id的类型是long,问题就出现在这里! (在写或者修改javabean时一些细节问题没有做好) eg.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |