- Home
- LLBLGen Pro
- LLBLGen Pro Runtime Framework
Joining tables on multible columns throws exception
Joined: 29-May-2008
Hi! I'm trying to join two tables on two columns. This is how the sql would look like:
select c.*
from s_sheet_detail d
, c_s_coding_serach c
where d.sheet = 11111
and d.Cnpt_Concept_Code = c.Concept_Code
and d.Term_Term_Id = c.Term_Id
This how I think my Linq should look like:
LinqMetaData mData = new LinqMetaData(AdapterProvider.Current.Adapter);
List<CSCodingSearchEntity> code2 = (from d in mData.SSheetDetail
join c in mData.CSCodingSearch on new
{
ConceptCode = (int)ConceptCode,
TermId = (int)d.TermTermId
}
equals new
{
c.ConceptCode,
c.TermId
}
select c).ToList<CSCodingSearchEntity>();
I need to do the ConceptCode = (int)d.CnptConceptCode stuff so I can compile the code, otherwise I get "The type of one of the expressions in the join clause is incorrect. Type inference failed in the call to 'Join'." and d.CnptConceptCode is a nullable int.
But when I run this code I get: Unable to cast object of type 'Saga.DataAccess.Generated.RelationClasses.DynamicRelation' to type 'SD.LLBLGen.Pro.ORMSupportClasses.EntityRelation'.
Is this not supported?
I'm using the lates 2.6 beta
GunnarIF wrote:
Hi! I'm trying to join two tables on two columns. This is how the sql would look like:
select c.* from s_sheet_detail d , c_s_coding_serach c where d.sheet = 11111 and d.Cnpt_Concept_Code = c.Concept_Code and d.Term_Term_Id = c.Term_Id
This how I think my Linq should look like:
LinqMetaData mData = new LinqMetaData(AdapterProvider.Current.Adapter); List<CSCodingSearchEntity> code2 = (from d in mData.SSheetDetail join c in mData.CSCodingSearch on new { ConceptCode = (int)ConceptCode, TermId = (int)d.TermTermId } equals new { c.ConceptCode, c.TermId } select c).ToList<CSCodingSearchEntity>();
I need to do the ConceptCode = (int)d.CnptConceptCode stuff so I can compile the code, otherwise I get "The type of one of the expressions in the join clause is incorrect. Type inference failed in the call to 'Join'." and d.CnptConceptCode is a nullable int.
Referring to d.TermTermId.Value should also work. Indeed, the C# compiler can't figure it out... (this is a C# compiler thingy. To get everything compiled, the anonymous type must have the same property names)
btw, in the first anonymous type, shouldn't you do: ConceptCode = (int)d.ConceptCode, ? Otherwise it doesn't match your example query.
But when I run this code I get: Unable to cast object of type 'Saga.DataAccess.Generated.RelationClasses.DynamicRelation' to type 'SD.LLBLGen.Pro.ORMSupportClasses.EntityRelation'. Is this not supported?
I'm using the lates 2.6 beta
Should work. I'll look into it.
Btw, as stated in the beta docs: please provide a stacktrace. An exception message without a stacktrace is pretty meaningless...
I can't reproduce it:
[Test]
public void CompoundPKJoinFetch()
{
using(DataAccessAdapter adapter = new DataAccessAdapter())
{
LinqMetaData metaData = new LinqMetaData(adapter);
var q = from p in metaData.PksideCompoundKey
join f in metaData.FksideCompoundKey on
new { IdField1 = p.Idfield1, IdField2 = p.Idfield2 } equals new { IdField1 = f.Idfield1.Value, IdField2 = f.Idfield2.Value }
select f;
foreach(var v in q)
{
Console.WriteLine(v);
}
}
}
FkSideCompoundKey has an FK to PkSideCompoundKey over 2 fields. FKSide's fields are nullable.
Results in:
SELECT DISTINCT [LPA_L2].[ID] AS [Id], [LPA_L2].[Amount], [LPA_L2].[IDField1] AS [Idfield1], [LPA_L2].[IDField2] AS [Idfield2] FROM ( [Northwind].[dbo].[PKSideCompoundKey] [LPA_L1] INNER JOIN [Northwind].[dbo].[FKSideCompoundKey] [LPA_L2] ON ( [LPA_L1].[IDField1] = [LPA_L2].[IDField1] AND [LPA_L1].[IDField2] = [LPA_L2].[IDField2]))
Note, if you don't use the build released on May 28th, you might run into an issue inside the join handler...
Which db you're using isn't important, unless you get the exception inside the RelationCollection class and your target db is Oracle 8i / 9i without ansi joins So I've to wait till you post a stacktrace
Joined: 29-May-2008
Sorry I found out I'm not using the lates build. The LinqSupportClasses assambly verision is 2.6.8.416 I'm using Oracle 10g database
I think this problem is because the CSCodingSearch.TermId does not have the same name as SSheetDetail.TermTermID
I'm going to try the lates build. But it will take a while.
Csla.DataPortalException was unhandled
Message="DataPortal.Fetch failed (Unable to cast object of type 'Saga.DataAccess.Generated.RelationClasses.DynamicRelation' to type 'SD.LLBLGen.Pro.ORMSupportClasses.EntityRelation'.)"
Source="Csla"
StackTrace:
at SD.LLBLGen.Pro.DQE.Oracle.DynamicQueryEngine.NonAnsiJoinConstructor(IRelationCollection relations, String& fromClause, String& whereClause, String rootTableReference, Int32& uniqueMarker, List1 customFilterParameters)
at SD.LLBLGen.Pro.DQE.Oracle.DynamicQueryEngine.NonAnsiJoinConstructor(IRelationCollection relations, String& fromClause, String& whereClause, Int32& uniqueMarker, List
1 customFilterParameters)
at SD.LLBLGen.Pro.DQE.Oracle.DynamicQueryEngine.CreateSelectDQ(IEntityFieldCore[] selectList, IFieldPersistenceInfo[] fieldsPersistenceInfo, IDbConnection connectionToUse, IPredicate selectFilter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relationsToWalk, Boolean allowDuplicates, IGroupByCollection groupByClause, Boolean relationsSpecified, Boolean sortClausesSpecified)
at SD.LLBLGen.Pro.ORMSupportClasses.DynamicQueryEngineBase.CreateSelectDQ(IEntityFieldCore[] selectList, IFieldPersistenceInfo[] fieldsPersistenceInfo, IDbConnection connectionToUse, IPredicate selectFilter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relationsToWalk, Boolean allowDuplicates, IGroupByCollection groupByClause)
at SD.LLBLGen.Pro.DQE.Oracle.DynamicQueryEngine.CreatePagingSelectDQ(IEntityFieldCore[] selectList, IFieldPersistenceInfo[] fieldsPersistenceInfo, IDbConnection connectionToUse, IPredicate selectFilter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relationsToWalk, Boolean allowDuplicates, IGroupByCollection groupByClause, Int32 pageNumber, Int32 pageSize)
at SD.LLBLGen.Pro.ORMSupportClasses.DynamicQueryEngineBase.CreateSelectDQ(IEntityFieldCore[] selectList, IFieldPersistenceInfo[] fieldsPersistenceInfo, IDbConnection connectionToUse, IPredicate selectFilter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relationsToWalk, Boolean allowDuplicates, IGroupByCollection groupByClause, Int32 pageNumber, Int32 pageSize)
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.CreateSelectDQ(IEntityFields2 fieldsToFetch, IFieldPersistenceInfo[] persistenceInfoObjects, IPredicateExpression filter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relationsToWalk, Boolean allowDuplicates, IGroupByCollection groupByClause, Int32 pageNumber, Int32 pageSize)
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityCollectionInternal(IEntityCollection2 collectionToFill, IRelationPredicateBucket& filterBucket, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses, ExcludeIncludeFieldsList excludedIncludedFields, Int32 pageNumber, Int32 pageSize)
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityCollection(IEntityCollection2 collectionToFill, IRelationPredicateBucket filterBucket, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses, IPrefetchPath2 prefetchPath, ExcludeIncludeFieldsList excludedIncludedFields, Int32 pageNumber, Int32 pageSize)
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProvider2.ExecuteEntityProjection(QueryExpression toExecute)
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProviderBase.ExecuteExpression(Expression handledExpression)
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProviderBase.Execute(Expression expression)
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProviderBase.System.Linq.IQueryProvider.Execute(Expression expression)
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProQuery1.Execute()
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProQuery
1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
at System.Collections.Generic.List1..ctor(IEnumerable
1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)
at Saga.BusinessLogic.MedicalData.Lab.LabRequestItems.Fetch(SSheetEntity sheet) in C:\Projects\Saga.NET\Layers\Business Logic\Saga.BusinessLogic\MedicalData\Lab\LabRequestItems.cs:line 52
at Saga.BusinessLogic.MedicalData.Lab.LabRequestItems..ctor(SSheetEntity sheet) in C:\Projects\Saga.NET\Layers\Business Logic\Saga.BusinessLogic\MedicalData\Lab\LabRequestItems.cs:line 33
at Saga.BusinessLogic.MedicalData.Lab.LabRequestItems.GetLabRequestItems(SSheetEntity sheet) in C:\Projects\Saga.NET\Layers\Business Logic\Saga.BusinessLogic\MedicalData\Lab\LabRequestItems.cs:line 81
at Saga.BusinessLogic.MedicalData.Lab.LabRequest.DataPortal_Fetch(LabRequestByIdCriteria criteria) in C:\Projects\Saga.NET\Layers\Business Logic\Saga.BusinessLogic\MedicalData\Lab\LabRequest.cs:line 215
at dm(Object , Object[] )
at Csla.Reflection.MethodCaller.CallMethod(Object obj, DynamicMethodHandle methodHandle, Object[] parameters) in C:\Projects\Saga.NET\Framework\CSLA_3.5\Csla\Reflection\MethodCaller.cs:line 221
at Csla.Reflection.MethodCaller.CallMethod(Object obj, DynamicMethodHandle methodHandle, Object[] parameters) in C:\Projects\Saga.NET\Framework\CSLA_3.5\Csla\Reflection\MethodCaller.cs:line 225
at Csla.Reflection.MethodCaller.CallMethod(Object obj, String method, Object[] parameters) in C:\Projects\Saga.NET\Framework\CSLA_3.5\Csla\Reflection\MethodCaller.cs:line 149
at Csla.Reflection.LateBoundObject.CallMethod(String method, Object[] parameters) in C:\Projects\Saga.NET\Framework\CSLA_3.5\Csla\Reflection\LateBoundObject.cs:line 86
at Csla.Server.SimpleDataPortal.Fetch(Type objectType, Object criteria, DataPortalContext context) in C:\Projects\Saga.NET\Framework\CSLA_3.5\Csla\DataPortal\Server\SimpleDataPortal.cs:line 126
at Csla.DataPortal.Fetch(Type objectType, Object criteria) in C:\Projects\Saga.NET\Framework\CSLA_3.5\Csla\DataPortal\Client\DataPortal.cs:line 249
at Csla.DataPortal.Fetch[T](Object criteria) in C:\Projects\Saga.NET\Framework\CSLA_3.5\Csla\DataPortal\Client\DataPortal.cs:line 165
at Saga.BusinessLogic.MedicalData.Lab.LabRequest.GetLabRequestById(Int32 id) in C:\Projects\Saga.NET\Layers\Business Logic\Saga.BusinessLogic\MedicalData\Lab\LabRequest.cs:line 146
at Saga.AppServer.Demo.Program.Main(String[] args) in C:\Projects\Saga.NET\Containers\Saga.AppServer.Demo\Program.cs:line 15
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: Csla.Reflection.CallMethodException
Message="DataPortal_Fetch method call failed"
Source="Csla"
StackTrace:
at SD.LLBLGen.Pro.DQE.Oracle.DynamicQueryEngine.NonAnsiJoinConstructor(IRelationCollection relations, String& fromClause, String& whereClause, String rootTableReference, Int32& uniqueMarker, List
1 customFilterParameters)
at SD.LLBLGen.Pro.DQE.Oracle.DynamicQueryEngine.NonAnsiJoinConstructor(IRelationCollection relations, String& fromClause, String& whereClause, Int32& uniqueMarker, List1 customFilterParameters)
at SD.LLBLGen.Pro.DQE.Oracle.DynamicQueryEngine.CreateSelectDQ(IEntityFieldCore[] selectList, IFieldPersistenceInfo[] fieldsPersistenceInfo, IDbConnection connectionToUse, IPredicate selectFilter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relationsToWalk, Boolean allowDuplicates, IGroupByCollection groupByClause, Boolean relationsSpecified, Boolean sortClausesSpecified)
at SD.LLBLGen.Pro.ORMSupportClasses.DynamicQueryEngineBase.CreateSelectDQ(IEntityFieldCore[] selectList, IFieldPersistenceInfo[] fieldsPersistenceInfo, IDbConnection connectionToUse, IPredicate selectFilter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relationsToWalk, Boolean allowDuplicates, IGroupByCollection groupByClause)
at SD.LLBLGen.Pro.DQE.Oracle.DynamicQueryEngine.CreatePagingSelectDQ(IEntityFieldCore[] selectList, IFieldPersistenceInfo[] fieldsPersistenceInfo, IDbConnection connectionToUse, IPredicate selectFilter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relationsToWalk, Boolean allowDuplicates, IGroupByCollection groupByClause, Int32 pageNumber, Int32 pageSize)
at SD.LLBLGen.Pro.ORMSupportClasses.DynamicQueryEngineBase.CreateSelectDQ(IEntityFieldCore[] selectList, IFieldPersistenceInfo[] fieldsPersistenceInfo, IDbConnection connectionToUse, IPredicate selectFilter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relationsToWalk, Boolean allowDuplicates, IGroupByCollection groupByClause, Int32 pageNumber, Int32 pageSize)
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.CreateSelectDQ(IEntityFields2 fieldsToFetch, IFieldPersistenceInfo[] persistenceInfoObjects, IPredicateExpression filter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relationsToWalk, Boolean allowDuplicates, IGroupByCollection groupByClause, Int32 pageNumber, Int32 pageSize)
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityCollectionInternal(IEntityCollection2 collectionToFill, IRelationPredicateBucket& filterBucket, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses, ExcludeIncludeFieldsList excludedIncludedFields, Int32 pageNumber, Int32 pageSize)
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityCollection(IEntityCollection2 collectionToFill, IRelationPredicateBucket filterBucket, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses, IPrefetchPath2 prefetchPath, ExcludeIncludeFieldsList excludedIncludedFields, Int32 pageNumber, Int32 pageSize)
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProvider2.ExecuteEntityProjection(QueryExpression toExecute)
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProviderBase.ExecuteExpression(Expression handledExpression)
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProviderBase.Execute(Expression expression)
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProviderBase.System.Linq.IQueryProvider.Execute(Expression expression)
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProQuery
1.Execute()
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProQuery1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
at System.Collections.Generic.List
1..ctor(IEnumerable1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable
1 source)
at Saga.BusinessLogic.MedicalData.Lab.LabRequestItems.Fetch(SSheetEntity sheet) in C:\Projects\Saga.NET\Layers\Business Logic\Saga.BusinessLogic\MedicalData\Lab\LabRequestItems.cs:line 52
at Saga.BusinessLogic.MedicalData.Lab.LabRequestItems..ctor(SSheetEntity sheet) in C:\Projects\Saga.NET\Layers\Business Logic\Saga.BusinessLogic\MedicalData\Lab\LabRequestItems.cs:line 33
at Saga.BusinessLogic.MedicalData.Lab.LabRequestItems.GetLabRequestItems(SSheetEntity sheet) in C:\Projects\Saga.NET\Layers\Business Logic\Saga.BusinessLogic\MedicalData\Lab\LabRequestItems.cs:line 81
at Saga.BusinessLogic.MedicalData.Lab.LabRequest.DataPortal_Fetch(LabRequestByIdCriteria criteria) in C:\Projects\Saga.NET\Layers\Business Logic\Saga.BusinessLogic\MedicalData\Lab\LabRequest.cs:line 215
at dm(Object , Object[] )
at Csla.Reflection.MethodCaller.CallMethod(Object obj, DynamicMethodHandle methodHandle, Object[] parameters) in C:\Projects\Saga.NET\Framework\CSLA_3.5\Csla\Reflection\MethodCaller.cs:line 221
at Csla.Reflection.MethodCaller.CallMethod(Object obj, DynamicMethodHandle methodHandle, Object[] parameters) in C:\Projects\Saga.NET\Framework\CSLA_3.5\Csla\Reflection\MethodCaller.cs:line 225
at Csla.Reflection.MethodCaller.CallMethod(Object obj, String method, Object[] parameters) in C:\Projects\Saga.NET\Framework\CSLA_3.5\Csla\Reflection\MethodCaller.cs:line 149
at Csla.Reflection.LateBoundObject.CallMethod(String method, Object[] parameters) in C:\Projects\Saga.NET\Framework\CSLA_3.5\Csla\Reflection\LateBoundObject.cs:line 86
at Csla.Server.SimpleDataPortal.Fetch(Type objectType, Object criteria, DataPortalContext context) in C:\Projects\Saga.NET\Framework\CSLA_3.5\Csla\DataPortal\Server\SimpleDataPortal.cs:line 126
InnerException: System.InvalidCastException
Message="Unable to cast object of type 'Saga.DataAccess.Generated.RelationClasses.DynamicRelation' to type 'SD.LLBLGen.Pro.ORMSupportClasses.EntityRelation'."
Source="SD.LLBLGen.Pro.DQE.OracleMS.NET20"
StackTrace:
at SD.LLBLGen.Pro.DQE.Oracle.DynamicQueryEngine.NonAnsiJoinConstructor(IRelationCollection relations, String& fromClause, String& whereClause, String rootTableReference, Int32& uniqueMarker, List1 customFilterParameters)
at SD.LLBLGen.Pro.DQE.Oracle.DynamicQueryEngine.NonAnsiJoinConstructor(IRelationCollection relations, String& fromClause, String& whereClause, Int32& uniqueMarker, List
1 customFilterParameters)
at SD.LLBLGen.Pro.DQE.Oracle.DynamicQueryEngine.CreateSelectDQ(IEntityFieldCore[] selectList, IFieldPersistenceInfo[] fieldsPersistenceInfo, IDbConnection connectionToUse, IPredicate selectFilter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relationsToWalk, Boolean allowDuplicates, IGroupByCollection groupByClause, Boolean relationsSpecified, Boolean sortClausesSpecified)
at SD.LLBLGen.Pro.ORMSupportClasses.DynamicQueryEngineBase.CreateSelectDQ(IEntityFieldCore[] selectList, IFieldPersistenceInfo[] fieldsPersistenceInfo, IDbConnection connectionToUse, IPredicate selectFilter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relationsToWalk, Boolean allowDuplicates, IGroupByCollection groupByClause)
at SD.LLBLGen.Pro.DQE.Oracle.DynamicQueryEngine.CreatePagingSelectDQ(IEntityFieldCore[] selectList, IFieldPersistenceInfo[] fieldsPersistenceInfo, IDbConnection connectionToUse, IPredicate selectFilter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relationsToWalk, Boolean allowDuplicates, IGroupByCollection groupByClause, Int32 pageNumber, Int32 pageSize)
at SD.LLBLGen.Pro.ORMSupportClasses.DynamicQueryEngineBase.CreateSelectDQ(IEntityFieldCore[] selectList, IFieldPersistenceInfo[] fieldsPersistenceInfo, IDbConnection connectionToUse, IPredicate selectFilter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relationsToWalk, Boolean allowDuplicates, IGroupByCollection groupByClause, Int32 pageNumber, Int32 pageSize)
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.CreateSelectDQ(IEntityFields2 fieldsToFetch, IFieldPersistenceInfo[] persistenceInfoObjects, IPredicateExpression filter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relationsToWalk, Boolean allowDuplicates, IGroupByCollection groupByClause, Int32 pageNumber, Int32 pageSize)
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityCollectionInternal(IEntityCollection2 collectionToFill, IRelationPredicateBucket& filterBucket, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses, ExcludeIncludeFieldsList excludedIncludedFields, Int32 pageNumber, Int32 pageSize)
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityCollection(IEntityCollection2 collectionToFill, IRelationPredicateBucket filterBucket, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses, IPrefetchPath2 prefetchPath, ExcludeIncludeFieldsList excludedIncludedFields, Int32 pageNumber, Int32 pageSize)
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProvider2.ExecuteEntityProjection(QueryExpression toExecute)
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProviderBase.ExecuteExpression(Expression handledExpression)
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProviderBase.Execute(Expression expression)
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProviderBase.System.Linq.IQueryProvider.Execute(Expression expression)
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProQuery1.Execute()
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProQuery
1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
at System.Collections.Generic.List1..ctor(IEnumerable
1 collection)
.................
Yes that's an old build. In that build non-ansi joins weren't supported yet. In the latest build this should work without a problem. (the routine the crash occurs has no notion of dynamic relations yet in your build, in the latest build this has all been taken care of, that routine is now merged with the normal RelationCollection.ToQueryText() routine. )