save()
is supposed to take a transient instance as argument, and not a persistent instance. The javadoc is not very exhaustive, but AFAIK, calling save()
on a persistent instance has no effect, other than cascading the operation to transient instances attached to the entity, is such a cascade is configured.
Note that there is usually no reason to call save()
or saveOrUpdate()
on an attached, persistent entity, since Hibernate dirty-checks the entities and makes persists the changes automatically.