ERROR [http-8080-Processor22] (BatchingBatcher.java:60) - Exception executing batch: org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1
今天出现了这个异常,不知从何下手。
Hibernate: update t_organization set orgNo=?, name=?, pid=?, description=? where id=?
hibernate 发送的语句,id=? 当我们传过去的值hibernate在数据库中找不到时就回出现这个异常。很多时候都使用BeanUitls.copyProperties() 而不关注主键,这样就回导致这样的异常。