2007-06-17

关于merge与IdTransferringMergeEventListener的用法

关键字: hibernate springframework
newObj = getHibernateTemplate().merge(obj); obj是一个游离对象,该方法将把obj中的属性更新到与obj主键一致的持久对象中,并返回该持久对象newObj。如果没有对应的持久对象,将会新建一个持久对象并将属性拷贝进去,并返回新对象。 参考: Copy the state of the given object onto the persistent object with the same identifier. Follows JSR-220 semantics. Similar to saveOrUpdate, but never ...
vague
搜索本博客
最近加入圈子
最新评论