+ -
当前位置:首页 → 问答吧 → spring+ibatis2.3.4架构 ,后台更改数据后,提取不到最新数据?

spring+ibatis2.3.4架构 ,后台更改数据后,提取不到最新数据?

时间:2011-12-10

来源:互联网

我在有一下两条语句
我用eclipse 的debug功能执行第一条语句后,暂停程序,后台修改了数据库中的数据,并提交
接着执行第二条语句,怎么删除 sctemplate1与sctemplate2是完全一样的记录呢,怎么没有提取到最新的记录?

1.scTemplate1=scTemplateDAO.selectByPrimaryKey(scTemplate.getId());
2. scTemplate2=scTemplateDAO.selectByPrimaryKey(scTemplate.getId());



 public ScTemplate selectByPrimaryKey(BigDecimal id) {
  ScTemplate key = new ScTemplate();
  key.setId(id);
  getSqlMapClientTemplate().getSqlMapClient().flushDataCache();
  ScTemplate record = (ScTemplate) getSqlMapClientTemplate().queryForObject("SC_TEMPLATE.abatorgenerated_selectByPrimaryKey", key);
  return record;
  }

作者: zhengyuepo   发布时间: 2011-12-10

自己提前

作者: zhengyuepo   发布时间: 2011-12-11

热门下载

更多