gavin wrote:
I guess you have changed the object since you detached it, and changed the collection reference. This is not allowed if you are going to use lock().
No. I was even more stupid:
The Log class had bad equals and hashCode methods, that presumably threw NPEs. I changed them and now it's working. Probably those NPEs in equals or hashCode prevented hibernate from making the snapshot.
It would have helped a lot, if hibernate wouldn't swalllow those exceptions.
gavin wrote:
I will try and track down the cause and make Hibernate throw a more helpful exception. NPEs are always bad.
It would help me a lot if you could submit a very simple test case to JIRA. Thanks.
Do you still need a test case?
Thanks a lot,
Holger