文章列表
 
2007-03-09 8:38
把session.saveOrUpdate(role); 改为

session.merge(role); 就搞定了

官方的user faq

I called saveOrUpdate() or update() and got a NonUniqueObjectException!

The session maintains a unique mapping between persistent identity and object instance, in order to help you avoid data aliasing problems. You cannot simultaneously attach two objects with the same class and identifier to the same session.

The be
 
   
 
 
文章分类
 
 
 
Mssql(11)
 
 
Html(33)
 
 
Java(45)
 
Jstl(5)
 
Vb(3)
 
 
.net(12)
 
Oracle(13)
 
 
Ejb(2)
 
 
Xmpp(0)
 
 
 
 
   
 
文章存档
 
     
 
最新文章评论
  

dai347718993 分析的精辟呀 学习了 相当于 一个是 ?预设参数 一个是直接 拼接sql语
 

up up
 

好使!
 

有一个很大的问题,如果查询时候name为:“s_”的话,模糊查询会怎么匹配?
 

roll()方法不是在本月内循环,而是它的日期只会直线向过去了的日子方向。。
   
帮助中心 | 空间客服 | 投诉中心 | 空间协议
©2012 Baidu