I'm trying to get a entity model to cascade merge.
When I call merge, sometimes the insert/update appears to succeed. Other times it fails:
Code:
java.lang.UnsupportedOperationException
at org.hibernate.util.IdentityMap.keySet(IdentityMap.java:195)
at org.hibernate.event.def.EventCache.keySet(EventCache.java:132)
at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:97)
From what I can tell, onMerge uses an org.hibernate.event.def.EventCache object based on IdentityMap. The IdentiyMap supports the entrySet method, but not the keySet method.
My objects do not override equals/hashcode and the model does have cycles, but when I look at the code for DefaultMergeEventListener in
http://fisheye.jboss.org/browse/Hiberna ... va?r=16664the only way I can see for it to work is to totally avoid the inner loop.
Any ideas?