Left Join giving an 'Unknown' found as source of DefaultIfEmpty

Posts   
 
    
DefQuery
User
Posts: 1
Joined: 28-Apr-2011
# Posted on: 28-Apr-2011 15:48:51   

I'm trying to do a simple left (outer) join between two tables T1 and T2. T2 may not be populated for all values in T1.

I'm using VB and version 2.6 of LBLGen Pro with the following query:

Dim ds = From oT1 In DataAccess.LinqMetaData.T1 _ Group Join oT2 In DataAccess.LinqMetaData.T2 On oT1.id Equals oT2.id Into grouplist = Group From oT2 In grouplist.DefaultIfEmpty _ Where (oT1.id = 100) _ Select oT1.id, oT2.desc

This compiles ok but I get the following runtime error:

"Unexpected expression type 'Unknown' found as source of DefaultIfEmpty(). Can't continue"

Any ideas?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39908
Joined: 17-Aug-2003
# Posted on: 28-Apr-2011 18:19:07   
Frans Bouma | Lead developer LLBLGen Pro