title: LINQ to SQL Join issues
body: <p>I'm trying to use the following LINQ to SQL in my code:</p>
  
  <pre><code>  (from s in dc.Accounts 
    join purchases in dc.Transactions on s.AccID equals purchases.Account into pu
    join pop in dc.POPTransactions on new { s.ID, syncNo } equals new {AccId = pop.AccountID, SyncNo = pop.SyncNo } into po
    where s.AccID == ID &amp;&amp; s.Customer == false
    select new AccsandPurchase { acc = s, purchases = pu.ToList(), pop = po.ToList() } ));
  </code></pre>
  
  <p>The error happens on the second join line (3rd line in the whole query above) - I used to have it so it just joined on s.ID and pop.AccountID and that worked perfect, but now I introduced another join critieria (the syncno) I get the following error:</p>
  
  <blockquote>
    <p>"The type of one of the expressions in
    the join clause is incorrect. Type
    inference failed in the call to
    'GroupJoin'"</p>
  </blockquote>
  
  <p>Any ideas? Some notes:</p>
  
  <p>1: 'the variable 'syncNo' is a long, as is the value in the DB (bigint). The value in the db is nullable so I've also tried "long?" as the variable type</p>
  
  <p>2: AccsandPurchase is a custom class I made, as you can probably guess</p>
  
  <p>Thanks</p>