- 浏览: 243780 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (281)
- hibernate (16)
- sql工具 (2)
- eclipse (15)
- tomcat (13)
- 项目部署 (4)
- java (62)
- spring (15)
- EL (1)
- javascript (8)
- 正则表达式 (1)
- jQuery (4)
- mysql (15)
- jstl (1)
- jsp (1)
- eclipse,eclipse插件 (1)
- svn (4)
- java,resin (1)
- jdbc (1)
- jdk (2)
- android (21)
- resin (3)
- php (3)
- 其他 (2)
- 数据库 (2)
- cas单点登录 (2)
- 邮箱激活 (1)
- jad (1)
- 支付 (1)
- struts (1)
- jpa (1)
- struts2 (4)
- json (3)
- oracle (2)
- velocity (1)
- sina微博登陆 (2)
- qq账户登录 (1)
- spring security (1)
- java图片处理 (1)
- http请求 (1)
- cas springsecurity (1)
- freemarker (1)
- cas (6)
- java oauth2 (2)
- oauth2.0 (6)
- springsecurity oauth2 (1)
- sms (1)
- springmvc (2)
- spring aop (1)
- luaeclipse (1)
- cocos2d (1)
- hibernate缓存 (1)
- ibatis (1)
- linux (7)
- 技术网站 (1)
- python (2)
- hadoop (1)
- war3 (0)
- elasticsearch (2)
- jboss (1)
- spring data jpa (2)
- java json (1)
- jsonp (1)
- webservice (4)
- java多线程 (1)
- java加密解密 (1)
- spring task (1)
- java session and cookie (1)
- java nio (1)
- 缓存 (1)
- java大数据 (1)
- cygwin (1)
- 设计模式 (1)
- mybatis (2)
- jquery插件 (2)
- jvm内存溢出 (1)
- drools (1)
- cookie and session (1)
- jvm内存设置 (1)
- nginx (1)
- 微信 (1)
- extjs (1)
- redis (7)
- memcached (1)
- js闭包 (1)
- js (0)
- mongodb (3)
- dubbo (2)
- jdk版本问题 (1)
- opnfire (1)
- git (1)
- jsp视频播放 (1)
- 国际化 (1)
- 后台管理 (1)
- yum (1)
- k (1)
- 算法 (0)
- jvm优化 (1)
- java检测 (1)
- maven操作 (0)
- ios打包 (1)
- 网络通信 (1)
- node.js (1)
- maven (4)
- 消息队列 (2)
- springcloud (6)
- mq (2)
- idea (3)
- log4j (1)
- docker (4)
- editplus (1)
- springboot (1)
- Kubernetes (1)
- jenkins (1)
- websocket (1)
- thirft (1)
- strom (1)
- postman (1)
- kafka (1)
- 线程池 (1)
- JVisualVM (1)
- java反射 (1)
- shell (1)
- java8 (2)
- i18 (1)
- jvm (0)
- nio (1)
- nodejs (1)
- idea java (1)
最新评论
-
pengfeifei26:
wbzhaohl 写道这个有解决方案没有时间长了,貌似有点忘了 ...
A redirect is required to get the users approval -
wbzhaohl:
这个有解决方案没有
A redirect is required to get the users approval -
somebody:
恩。好吧。这个只有在 还没发布的 2.0 版本才有。
oauth2.0设置自动授权
a different object with the same identifier value was already associated with th
1、a different object with the same identifier value was already associated with the session。
错误原因:在hibernate中同一个session里面有了两个相同标识但是是不同实体。
解决方法一:session.clean()
PS:如果在clean操作后面又进行了saveOrUpdate(object)等改变数据状态的操作,有可能会报出"Found two representations of same collection"异常。
解决方法二:session.refresh(object)
PS:当object不是数据库中已有数据的对象的时候,不能使用session.refresh(object)因为该方法是从hibernate的session中去重新取object,如果session中没有这个对象,则会报错所以当你使用saveOrUpdate(object)之前还需要判断一下。
解决方法三:session.merge(object)
PS:Hibernate里面自带的方法,推荐使用。
2、Found two representations of same collection
错误原因:见1。
解决方法:session.merge(object)
以上两中异常经常出现在一对多映射和多对多映射中
错误原因:在hibernate中同一个session里面有了两个相同标识但是是不同实体。
解决方法一:session.clean()
PS:如果在clean操作后面又进行了saveOrUpdate(object)等改变数据状态的操作,有可能会报出"Found two representations of same collection"异常。
解决方法二:session.refresh(object)
PS:当object不是数据库中已有数据的对象的时候,不能使用session.refresh(object)因为该方法是从hibernate的session中去重新取object,如果session中没有这个对象,则会报错所以当你使用saveOrUpdate(object)之前还需要判断一下。
解决方法三:session.merge(object)
PS:Hibernate里面自带的方法,推荐使用。
2、Found two representations of same collection
错误原因:见1。
解决方法:session.merge(object)
以上两中异常经常出现在一对多映射和多对多映射中
发表评论
-
二叉树创建和遍历
2015-03-30 22:10 670package test; import java. ... -
solr使用
2015-03-08 12:31 0http://www.52menshao.com/conten ... -
hibernate连多个库及session操作
2014-06-06 16:19 624http://www.blogjava.net/yzzh9/a ... -
java 对xml进行sax解析
2014-04-25 14:28 801import java.util.ArrayList; ... -
关于算法
2014-03-31 18:48 391http://bbs.csdn.net/topics/3907 ... -
java js 插件
2014-03-27 16:08 334http://www.malot.fr/bootstrap-d ... -
关于java模式
2014-03-13 17:04 284http://gxl-ct001.iteye.com/blog ... -
关于秒杀
2014-02-25 18:47 0http://www.blogjava.net/dongbul ... -
Spring 使用注解方式进行事务管理
2014-01-18 15:33 667事物注解方式: @Transactional 当标于类前时, ... -
Transaction rolled back because it has been marked as rollback-only
2014-01-16 15:02 629http://narcissusoyf.iteye.com/b ... -
An internal error occurred during: "Fetching children of Database".
2014-01-14 17:50 1427An internal error occurred duri ... -
json格式时间转java时间
2014-01-08 16:17 1048http://surongly.iteye.com/blog/ ... -
Java时间日期格式转换
2014-01-03 18:26 466http://blog.csdn.net/Miniyaner/ ... -
JAVA调用sms
2014-01-03 16:15 437http://sms.webchinese.cn/api.sh ... -
oauth2.0 accesstoken验证无效处理类
2013-12-24 19:20 1104org.springframework.security.oa ... -
oauth2.0设置自动授权
2013-12-24 19:12 1399将 oauth_client_details 库表中autoa ... -
刷新access_token 类
2013-12-24 18:52 650刷新access_token 类 先删除掉库里保存的记录,然 ... -
oauth2.0怎么验证accesstoken是否正确或合法
2013-12-24 18:05 2164验证access_token流程 OAuth2Authent ... -
怎么样判断accesstoken是否过期
2013-12-24 18:02 1800用code去换取token的时候,会返回三个参数:现在的acc ... -
hibernate异常:failed to lazily initialize a collection of role
2013-12-18 11:21 717设置lazy即可 private Set<UrsMem ...
相关推荐
a different object with the same identifier value was already associated with the session 是一种常见的异常,通常是由于在 Hibernate 中同一个 session 里面有了两个相同标识但是是不同实体所致。解决方案有...
5. `a different object with the same identifier value was already associated with the session` 这个异常表明在同一个Hibernate Session中存在两个具有相同标识但实际是不同对象的情况。处理方法有: - 使用`...
In these systems, packets are transmitted over the same wireless infrastructure used for cellular telephony, with the base station thus being managed by a telecommunications provider. This provides ...
数字对象标识符(Digital Object Identifier,简称DOI)是一种持久性标识符,用于唯一地标识数字资源,如学术文章、数据集等。DOI系统由国际DOI基金会管理,并在出版界广泛采用。随着数字资源的增加以及对资源描述的...
When the SID is found in a value it is replaced with the new computer SID, and when the SID is found in a name, the key and its subkeys are copied to a new subkey that has the same name except with ...
- When the signal conditioning function "S&M" was used for a byte value, the driver wrote wrong values to the PLC. Build 223 : New Functions: - The number of supported NetLinks has been ...
- FIX: The value of some string flex-properties that began with a parenthese or curly bracket had no apostrophe at the end; that caused an error when reading. (fixed TPropList.SavePropValue for the ...
Another type of table lock is a schema stability lock (Sch-S) and is compatible with all table locks except the schema modification lock (Sch-M). The schema modification lock (Sch-M) is incompatible ...
Each index row in node pages contains an index key (or set of keys for a composite index) and a pointer to a page at the next level for which the first key value is the same as the key value in the ...
EXIF Data and the Map Object The speed Property Conclusion Chapter 11 : Microphone and Audio The Microphone Audio Assets Working with Sounds ID3 Tags Modifying Sound Raw Data and the Sound Spectrum ...
Adds a response header with the given name and value. addIntHeader(String, int) - Method in class javax.servlet.http.HttpServletResponseWrapper The default behavior of this method is to call ...
This was due to a problem where it would be freed automatically if there was a problem with the ArchiveStream when trying to open it as a zip file (possibly corrupt). Best practice is that ...
two and must be the same length on both ends.Term ID: A unique identifier for a Term within a Stream. Starts randomly. Must increase monotonically. Can wrap around. Can not go back to a wrapped ...
created with the default settings in Microsoft Visual C++ 6 with one major exception: aside from other compiler and linker flags, the executable in the DEBUG directory has been compiled with the ...
The "Identifier Case Sensitive" check box, which enables case-sensitive processing of database object identifier names, is added to MySQL Server Options The documentation generation for Enum members ...
本文介绍Oralce数据库中,表名可以使用的最大长度。这个长度也是Oracle...*Cause: An identifier with more than 30 characters was specified. *Action: Specify at most 30 characters. 从这个错误提示可以看出
make use of the CAN implementations that are already available on the market, or of new controllers that implement both formats. In order to distinguish standard and extended format the first reserved...
Stores a unique identifier for the file, allowing for the identification of files across different volumes. ##### Attribute - $SECURITY_DESCRIPTOR (0x50) Holds security-related information, such as ...
LibTomCrypt is a fairly comprehensive, modular and portable cryptographic toolkit that provides developers with a vast array of well known published block ciphers, one-way hash functions, chaining ...