I have a question regarding Linq queries using the latest bits from NHibernate Contrib project.
Is there someone who could tell me how to state a query using a join only for where conditions, eg.
from c in db.Customers
join o in db.Orders on c.CustomerID equals o.CustomerID
where o.OrderDate == DateTime.Today
select c;
As I understand it, the above query is not possible to run with the current version of NHibernate.Linq because of the join. My intention of the join is only to make it possible to use the other table in the where-clause. If I rewrite the query with a possible to run notation as follows:
from c in db.Customers
from o in c.Orders.Cast<Order>()
where o.OrderDate == DateTime.Today
select c;
makes Nhibernate do a join fetch in this query which was NOT my intention.
/Mats
|