+1 bag works because Adds always succeed in a list that allows duplicates. With a set NH first has to check the elements in the array, which means a trip to the db.
On Tue, Feb 17, 2009 at 9:00 AM, Fabio Maulo <[email protected]> wrote: > <bag> has what you are looking for but take care on what you are doing with > the collection (if you are using something else than Add method);and take > a look to lazy="extra" in the trunk (next version NH2.1.0). > > 2009/2/17 Carsten Hess <[email protected]> > >> >> Hello nhusers. >> >> Using NHibernate 1.2 and 2.0 for a while, but have never been able to >> find out whether its possible to do the above. >> >> To be more specific its about having a large collection that I don't >> always need to load in my session - sometimes I only need to add an >> element to it, and would like to do so without loading it. I >> understand that if my collection is a set it would not make sense, as >> the set-semantics could not be checked, but how about lists and bags - >> that should be possible? >> >> Anyone ? >> >> Regards >> Carsten >> >> >> > > > -- > Fabio Maulo > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
