0
我有我的POJO類的一個對象,我保存在我的Redis的(的NoSql)服務器byte[]
。Hibernate的序列化/反序列化對象,並將其保存
現在我當我從Redis服務器返回對象,進行一些更改並調用session.saveOrUpdate()
時,它會引發異常。
a different object with the same identifier value was already associated with the session
我使用SerializationHelper
類serialize()
和deserialize()
的對象和它的工作的罰款。
有什麼辦法可以在Hibernate中保存反序列化對象。
拋出「例外」,呃?哪一個? – 2012-07-06 10:59:00
增加了異常 – 2012-07-06 11:00:55
[Hibernate:具有相同標識符值的不同對象已經與會話相關聯]的可能重複(http://stackoverflow.com/questions/3553200/hibernate-different-object-with-the-same-標識符 - 值是-已經準) – 2012-10-15 08:05:24