[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2373?page=c...
]
Emmanuel Bernard commented on HHH-2373:
---------------------------------------
not sure about the validity. 3.2.2 might have fix the issue. assigning to me
Merging a persistent object leads to cascading failure in
collections
---------------------------------------------------------------------
Key: HHH-2373
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2373
Project: Hibernate3
Type: Bug
Components: core
Versions: 3.2.1
Reporter: Emmanuel Bernard
Assignee: Emmanuel Bernard
Fix For: 3.2.3
class Empire {
...
@OneToMany(cascade.ALL)
public Set<Colony> colonies;
}
Then
roman = (Empire) em.get( Empire.class, roman.getId() );
Colony gaule = new Colony();
roman.getColonies().add(gaule);
em.merge( roman ); //If commented, will work
em.flush();
em.clear();
roman =(Empire) em.get(Empire.class, roman.getId() );
assertEquals( 1, roman.getColonies().size() );
I believe the issue is about having a persistent copy of gaule (according to the merge
API), not part of roman.getColonies() (colonies containing the transient gaule object)
--
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