You usually don't maintain such associations as collections because you never load them as such.
Better you just maintain the association as an unidirectional one pointing from the persons to a country. And then you provide a service for deleting a country. You might want to do the delete operation for all the persons of a country without NHibernate knowing about it... e.g. with a stored procedure or a direct database delete command because even in the delete case you don't want to load all persons of a country into the session, do you? On 17 Feb., 15:03, Norman <[email protected]> wrote: > Lets say I have Country and Person objects. > > I do not want the property Country.People as it would be far too big > to load. I would always load people separately. > > However I do want to be able to cascade deletes. So if I delete a > country I also want to delete its people: > > session.Delete(country); > > Is there some way to have a mapping without a property or to mark the > property so that it is never loaded? > > Thanks for your help. -- 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.
