Is there any work-around for NHibernate-to-LINQ not supporting subqueries?
I know LINQ-to-NHibernate currently does not support sub-queries (http://ayende.com/Blog/archive/2009/07/26/nhibernate-linq-1.0-released.aspx).
Is there any workaround about it?
linq-to-nh DOES support sub queries in where clause. It is exact thing I needed. I was wrong with my previous answer. Both martijnboland and Stefan Steinegger were right. To see how you do sub-queries in linq-to-nh see this and this. There is also limitations.
I think the workaround is simply to use HQL or Criteria.
I have not worked with nhibernate to linq but i'm sure that you can translate almost any subquery to a join
I have used a two part LINQ query as a work around. A LINQ-to-NHibernate for not related sub query section and a LINQ-to-Object for sub query related section of the query. Please see http://afsharm.blogspot.com/2010/03/dealing-with-subqueries-in-linq-to.html for more detail.