[hibernate-dev] Possible to confirm that versioning is broken forPersistentSets?

Josh Moore josh.moore at gmx.de
Wed Sep 13 06:02:40 EDT 2006


Max Rydahl Andersen wrote:
> if there are additions/removals to the collection then yes.
> The reason being that the actual collections are considered value types 
> of the entity.
> If you don't want optimistic locking to fire here then set 
> optimistic-lock="false" on the association.

Thanks Max. The question being: and if there _weren't_ 
additions/removals? I perhaps cut out too much of the test I attached to 
HHH-1401, but after the first save everything is flushed. The merge is 
then getting a pure detached graph (no changes).

It seems that CollectionType.replaceElements makes lots of calls to the 
PersistentCollection which force the dirty flag to be set. What I can't 
find is the logic that would check to see that this, in fact, not dirty 
and unset dirty.




More information about the hibernate-dev mailing list