I'm probaly missing something, but I can't get the Expand method to
work. I thought it was going to behave like eager loading, but the
expanded part of the query is getting modified by other expressions:

This is m query

(from m in (Session.Linq<Product>()).Expand("ProductCategories")
                    where m.Date == date
                    select m).FirstOrDefault();


The product have many categories, but I'm only getting the first one.
A quick look with the profiler show that the top1 is getting applied
to all the query, so I'm only getting the first row (the first
category)


If I use Eager loading and remove the expand from the expression I get
the expeceted result.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"NHibernate Contrib - Development Group" 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.ar/group/nhcdevs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to