首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

hibernate中executeUpdate的缓存问题

{使用批量更新hibernate中的executeUpdate() } 3.把插入的部门排序更新成插入位置的序号。...t.orderno+1 where t.orderno >="+orderNo); int count = getSession().createQuery(sb.toString()).executeUpdate...问题原因分析: 1 初步分析 首先怀疑执行executeUpdate方法后不会更新到缓存到hibernate的一级缓存中去,所以junit测试的时候拿到的还是原来的缓存对象。...2 方法执行调试: 1 executeUpdate被执行时尽管后台也有响应的hql输出,但是此时调用获取部门列表,查看返回的部门列表,排序属性还是原来的,所以executeUpdate不会更新hibernate...的缓存中对象的,这也情有可原因为executeUpdate操作是可能更新海量数据的。

66120
领券