控制台报错:
ERROR org.hibernate.internal.SessionImpl - HHH000346: Error during managed flush [Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1]
由于存在隐藏表单进行回显,导致提交时value不是Null,而是"",而我设置的主键生成策略是uuid,所以无法赋值导致错误,解决方法是隐藏表单外面添加了if判断!
<!-- 隐藏域回显当前编辑的拜访记录id -->
<s:if test="#saleVisit.visit_id!=''"><input type="hidden" name="visit_id" value="<s:property value="#saleVisit.visit_id" />" /></s:if>