That's all very well if your application is all in one JVM but what happens when the objects have to be serialized etc...
I just wrote a simple test case where I loaded an object, serialized it to a byte array and then de-serialized it and attempted to saveOrUpdate it and I still received the same exception. This was all done in the same JVM and there was no modification to the object except for the serialization/de-serialization.
Quote:
You *are* allowed to do it, but its inefficient.
Ummm It doesn't seem like it to me? What am I doing wrong?
I understand why it's inefficient to replace the collections. Though in the case of my objects I don't think it would be that great a hit as the collections are all quite small.