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.
_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev