-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Collection performance: many-to-many association with a set
PostPosted: Sat Oct 06, 2012 10:26 pm 
Newbie

Joined: Sat Oct 06, 2012 10:16 pm
Posts: 1
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!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.