Hi All
I am starting to use NH Linq more and more and I am trying to Campaign in a one-to-many with CampaignRun So to get the first campaign var campaign = Service.Query<Campaign>().First(w => w.Client.Id == UserHelper.Id && w.Id == campaignId) If I then want to get a CampaignRun by ID for the given campaign I could use:- var cr = Service.Query<CampaignRun>().First(w => w.Campaign.Id == campaignId && w.Id == id); However if I use this code:- var cr = campaign.CampaignRunList.First(w=>w.Id == id); The database retrieves ALL children and applies the filtering in memory which for large collections is not good. Do I have any other options using the Linq provider? Thanks -- 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.
