title: nHibernate QueryOver and JoinQueryOver
body: <p>I'm reasonably new to nHibernate and I've been trying to write a query. I cant seem to get it right. I have in my model, a "Product" which contains a ICollection of "Component". I need to find all products that contain any components that have a component reference starting with the letter "G". I have tried this:</p>
  
  <pre><code>var matching = session.QueryOver&lt;Product&gt;()
     .JoinQueryOver&lt;Component&gt;(p =&gt; p.Components)
     .Where(c =&gt; c.ComponentReference.StartsWith("G")).List();
  </code></pre>
  
  <p>However I am getting a compile error saying 'Delegate System.Func>> does not take 1 parameter. </p>
  
  <p>There is an overload on JoinQueryOver where I can pass in an Expression>></p>
  
  <p>So I would have thought my query would work since ICollection implements IEnumerable.</p>
  
  <p>I have tried various other ways using .Cast and JoinAlias but they just seem unecessarily complicated. </p>
  
  <p>Can anyone point out where I am going wrong?</p>
  
  <p>Thanks in advance</p>