我在有一下两条语句
我用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;
}
我用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;
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货