update store set st_onhandqty=st_onhandqty+100 where st_proid='1001'
我不懂JAVA,我对entity bean的理解是session bean处理业务逻辑然后把结果写进entitybean,最后事务提交时,所有被更新过的entitybean通过JDBC把数据写进DB中。
如果执行的是这条语句:updatestore set st_lastupdateuser='tom' where st_proid='1001',我觉得没问题,因为他不管该字段当前是什么值,而st_onhandqty+100就不同了,因为entitybean取数时可能是3000,但当他提交时,该字段的值可能已被其他事务修改掉了,不再是3000了。