Test case attached.
Also asked on Stack Overflow a couple of days back: http://stackoverflow.com/questions/27577403/non-empty-collections-always-marked-dirty-after-hibernate-merge-of-detached-obje
Like I've said, don't know if it's a bug or by design, but it's something I wasn't expecting. It seems that any modification of the collection (and hence the underlying persistent bag) marks a collection as dirty (the only workaround I've found round it is to upcast the iterator, but that's far from ideal).
|