http://nhforge.org/doc/nh/en/index.html#performance-collections-mostefficentinverse
________________________________________ Från: [email protected] [[email protected]] för muha [[email protected]] Skickat: den 14 juli 2010 13:04 Till: nhusers Ämne: [nhusers] HowTo implement an Add-only collection? Hi, I have a problem that is simple from logical point of view, but I need some help implementing it in NHibernate. Let's say I'm implementing a mailing group server. There are many groups and many users, each of them belonging to one or more groups. A "Group" class has a "Users" member, which is an IList of "User" objects, lazy-initialized of course. I want to add an user to a group (and store this information in a separate table, UsersInGroups). In all examples I could find, the "Users" collection gets initialized just as I'm adding a new object to it. What I want to achieve is that the list of users is not downloaded - since all I'm doing is adding a new item to this list. Is there a way to implement it by proper configuration of "Group" class and mapping, or should I access UsersInGroups directly? Thanks in advance, Tomasz -- 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. -- 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.
