save update saveorupdate 区别 save 保存数据 update 更新数据,根据主键 saveorupdate 根据主键判断:如果存在则更新、不存在则删除;主键不能委托hibernate写入,必须手动写入。否则会报: Batch update returned unexpected row count from update [0]; actual row count: 0;