public Organization merge(Organization detachedInstance) {
log.debug("merging Organization instance");
try {
Organization result = (Organization) getHibernateTemplate()
.merge(detachedInstance);
log.debug("merge successful");
return result;
} catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
} copyright dedecms
public void saveOrUpdate(Organization transientInstance) {
log.debug("saveOrUpdate Organization instance");
try {
getHibernateTemplate().saveOrUpdate(transientInstance);
log.debug("save successful");
} catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
上面2种方法都是什么含义?有什么区别? dedecms.com
为什么我修改一条数据时,它会保持以前数据的同时,自动添加一条新的数据!
dedecms.com
copyright dedecms
本文来自织梦
复制地址和好友共享







