Hi all,
I'm getting a HibernateException saying
"Found two representations of same collection: domain.Email.recipients" when updating a class that's holding a java.util.Set of java.lang.Strings. Doing a Session#save() on the same object works perfect. It's just the Session#update() that's making trouble here.
I tried searching the Hibernate forum and found a couple of old threads that discussed the same problem but there were no solutions offered. (I also tried reading the auto-translated Russian Hibernate forum but no luck there either)
Here's all the relevant pieces:
I'm using Hibernate version 2.1.7c against PostgreSQL 8.0.0-rc4 (Win32).
The mapping document:
Database tables:
The
Java class being mapped:
The piece of code doing the failing update:
The stack trace of the exception that gets thrown:
The generated SQL:
And, finally, the debug level Hibernate log excerpt:
Big thanks for reading this far!
[ January 16, 2005: Message edited by: Lasse Koskela ]