Hi,
It seems like we're not alone! Our team ran onto this bug a few weeks ago on Hibernate 4.3 (latest release).
I was working on a test case on Friday... For what it's worth, here's the pull request, which includes just a test case, no fix: https:// hibernate github . atlassian.net com / browse hibernate / HHH hibernate - 9078 orm/pull/718
It seems, in fact, that the bug shows up when trying to add elements to a lazy-proxied collection which has not been accessed (hence has not been initialized) yet. The effect isn't that the collection is "erased" and replaced by a single element, but rather that the added element replaces the first one, instead of being added at the end. I may not be clear here, but the test case should be.
|