主键是否为null,如果为null,那么新增,否则更新。主键为空字符串会执行更新而不是新增。
hibernate的saveOrUpdate
猜你喜欢
转载自blog.csdn.net/lizhiqiang1217/article/details/82498414
今日推荐
周排行