From the Hibernate documentation http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html/performance.html#performance-collections-mostefficientupdate :
Quote:
There is, arguably, one more advantage that indexed collections have over sets for many-to-many associations or collections of values. Because of the structure of a Set, Hibernate does not UPDATE a row when an element is "changed". Changes to a Set always work via INSERT and DELETE of individual rows. Once again, this consideration does not apply to one-to-many associations.
I am wondering:
1. How can there be a many-to-many collection of values (i.e. value types)...? I thought value types have only one owner...?
2. Why, in the case of a many-to-many association with a set, Hibernate does not UPDATE when an element in the set is changed, and instead uses INSERT and DELETE?
Thanks!