Senior |
|
Joined: Tue Mar 09, 2004 2:38 pm Posts: 141 Location: Lowell, MA USA
|
Well, it depends on the type of collection used. I happen to be using a Set and the values will be compared as to not allow duplicate values. If Hibernate needs to load the items in the Addresses Set of my User instance in order to identify duplicate instances. That is the expected behavior and I understand that.
However, what I am seeing is that other Sets such as the User's phone numbers, email addresses and other one-to-many collections are being fully initialzed when I add an Address to the User and pass the user to Session.persist(). This is behavior that I have not encountered when using the XML mappings and calling Session.update().
Ryan-
_________________ Ryan J. McDonough
http://damnhandy.com
Please remember to rate!
|
|