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.  [ 5 posts ] 
Author Message
 Post subject: Adding an element to collection without loading collection
PostPosted: Thu Oct 27, 2005 11:39 am 
Regular
Regular

Joined: Tue May 31, 2005 9:55 am
Posts: 67
Is it possible with any of the collections (bag, list) to be able to add an element to the end of the collection without loading all the existing elements in the collection?

Thanks,
craig


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 27, 2005 12:04 pm 
Senior
Senior

Joined: Sat Sep 10, 2005 3:46 pm
Posts: 178
See this post
http://nhibernate.sourceforge.net/forum/viewtopic.php?t=1151


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 27, 2005 2:02 pm 
Regular
Regular

Joined: Tue May 31, 2005 9:55 am
Posts: 67
Great! So my understanding is that an IList mapped as a <list> will initialize the entire collcetion when adding to the end. I guess I should replace it with a bag.

Thanks for pointing this out to me.

craig


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 27, 2005 2:06 pm 
Regular
Regular

Joined: Tue May 31, 2005 9:55 am
Posts: 67
Will a bidirectional relationship cause an initialize of a bag collection during an Add?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 27, 2005 2:11 pm 
Senior
Senior

Joined: Sat Sep 10, 2005 3:46 pm
Posts: 178
No it will not. I have just been testing this and a bag is the only one that will not get initialized on an add. Removes and inserts will initialize the bag though. I dont think there would be anyway to avoid that.


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

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.