Hello,
I have seen the
PersistentBag.equalsSnapshot method implementation is quite different from the other collections, and there is neither any comment nor some change in history for explaining that.
The point is, all other collections (including
idbag) EqualsSnapshot methods do check each element current value dirtiness against the snapshot element value, while PersistentBag only check they are "same" (which does a reference equality for entity types). Granted, it needs that check for checking their duplication count is same (bag semantics). But shouldn't it check dirtiness too at some point, as all other collections do?
I find such discrepancy suspect, especially since nothing seems to explain it.
In fact, I have seen that first on
NHibernate side, and now see it is there in Hibernate too.
Does anyone knows a good reason for this?
Best regards.