I'm running with the latest (well as of about a week ago or so) trunk version.

With the linq provider can I force an eager load of a referenced object?

blahs =   BlahRepository.Query()
                        .Where(o => o.LastLogged > DateTime.Now -
TimeSpan.FromDays(1))
                        .Take(300).ToList();

the to list then seems to cause a lazy load of a bunch of objects.
ie, 300 selects!

The reason (I think) being that there's a bit of a non normal mapping
as its a legacy database...

References(x => x.Sim).Column("strSIM").PropertyRef("Imsi");

ie, its joining to the "sim" table via one of "sims" properties ( not
via its key)

For whatever reason this causes as many queries as objects returned
from the linq query.....but I'd like to make it do a join.


Any clues??

Regards,

Keith

-- 
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.

Reply via email to