[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2119?page=all ]
Christian Bauer resolved HHH-2119:
----------------------------------
Resolution: Incomplete
reloading a detached object with a collection fails
---------------------------------------------------
Key: HHH-2119
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2119
Project: Hibernate3
Type: Bug
Versions: 3.1.3
Environment: Hibernate 3.1.3
firebird 1.5.3.4870 with Jaybird-2.1.0
java 1.5.0_07
Reporter: Gregory Kotsaftis
Hi,
1) I have a simple object <O> with a collection loaded and use <version> for
both (no second level cache)
2) The object <O> is associated with session A, via <O> = load(CLASS,
<ID>)
3) The session <A> is later closed because e.g. an exception occurs
4) Another session is opened later on, session B
5) If load(<O>, <ID>) is called an NonUniqueObjectException is thrown
(a different object with the same identifier value was already associated with the
session)
6) If instead I use the session.refresh(<O>) no exception is thrown, the object is
reloaded ok.
It seems this issue might be related with:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-511
but i cannot be sure.
Part of the stacktrace:
org.hibernate.NonUniqueObjectException: a different object with the same identifier value
was already associated with the session: [gr.metadata.orthomed.db.Patient#23]
at
org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:132)
at
org.hibernate.event.def.DefaultLoadEventListener.returnNarrowedProxy(DefaultLoadEventListener.java:202)
at
org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:169)
at
org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:862)
at org.hibernate.impl.SessionImpl.load(SessionImpl.java:770)
at gr.metadata.lib.hibernate.HibernateHelper.reloadObject(HibernateHelper.java:230)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira