hibernate执行save()方法,但是却又执行了update(),并且还会报错:Batch update returned unexpected row count from update

hibernate执行save()方法,但是却又执行了update(),并且还会报错:Batch update returned unexpected row count from update

原因是因为在执行saveOrUpdate修改数据库数据时,根据条件检索到多条数据。
把sql拿出来跑一下看看。

是不是javabean里面包含了主键值,主键是怎么产生的呢?