Left Outer Join Throws "No value nodes found for Type" error.

Jul 2, 2009 at 5:24 PM
Edited Jul 2, 2009 at 5:30 PM

Hi,

I build a linq query to retreive data from three tables.I have created left outer join on the these tables as given below :

from c1 in crmFacade.GetQueryProvider().Linq<contact1>() 
join c2 in crmFacade.GetQueryProvider().Linq<contact2>()

on c1.contactid.Value equals c2.contactid.Value 

 into tempRenewal from renewal in tempRenewal.DefaultIfEmpty()

join c3 in crmFacade.GetQueryProvider().Linq<contact3>()
on c2.chapterid.Value equals c3.chapterid.Value
into tempChapter from chapter in tempChapter.DefaultIfEmpty()
where

c1.pa_webloginname == userName

select new

Profile

 {

FullName = c1.labelname ==null ? string.Empty : c1.labelname,

 LastName =  c2.lastname == null ? string.Empty : c2.lastname  //Error is thrown due to this line.

 }).FirstItemOrDefault();
 


 When I execute this query an exception is thrown saying "No value nodes found for Type contact3".

This error is thrown from "ConstructCrmObject(Type t)"  method in "LinqToCrm.CrmQueryProvider.ConstructCrmObject()" method.

How do I solve this issue?

Thanks in advance.

-Arvind

Developer
Jul 3, 2009 at 9:58 AM

Please open an issue to the issue tracker and attach also the fetchxml you expect this query to produce so that we can easily write a test case for the issue.