Gail Badner commented on Bug HHH-4468

What was happening is that dereferenced collections are removed from the persistence context, but the session is still set in the dereferenced collection. The fix "unsets" the session in the PersistentCollection.

After making this change, all tests passed, except for FooBarTest.testSaveOrUpdateCopyAny(). The reason it did not pass is because one.manies is null. When this entity was merged and flushed, the loaded entity contained an uninitialized PersistentSet, but one.manies was actually null.

I believe this fix uncovers a different bug, which will need more research.

I've closed the pull request so I can look into this further.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira