Hello,
Using this outer join technique with DefaultIfEmpty we get an error if the table that is not mandatory has a boolean field:
var poolsAndAdmins = (from pool in _metaData.Pool
join iplanUser in _metaData.IplanUser on pool.AdminIplanUserId equals iplanUser.Id into adminUsers
from adminUser in adminUsers.DefaultIfEmpty()
select adminUser.IsPhotoShown).ToList();
We are using version 4.1 Final (March 12th, 2014) and Oracle (ODP.NET). If we do "select adminUser" it also fails, if we select all fields except this boolean field it works.
Regards,
Alexander.
Stacktrace:
at SD.LLBLGen.Pro.ORMSupportClasses.BooleanNumericConverter.PerformConvertFrom(Object value)
at SD.LLBLGen.Pro.ORMSupportClasses.SystemTypeConverterBase1.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
at SD.LLBLGen.Pro.ORMSupportClasses.ProjectionUtils.FetchProjectionFromReader(List
1 valueProjectors, IGeneralDataProjector projector, IDataReader datasource, Int32 rowsToSkip, Int32 rowsToTake, Boolean clientSideLimitation, Boolean clientSideDistinctFiltering, Boolean clientSidePaging, UniqueList1 stringCache, Dictionary
2 typeConvertersToRun, IRetrievalQuery queryExecuted)
at SD.LLBLGen.Pro.ORMSupportClasses.DaoBase.GetAsProjection(List1 valueProjectors, IGeneralDataProjector projector, ITransaction transactionToUse, IRetrievalQuery queryToExecute, Dictionary
2 typeConvertersToRun)
at SD.LLBLGen.Pro.ORMSupportClasses.DaoBase.GetAsProjection(List1 valueProjectors, IGeneralDataProjector projector, ITransaction transactionToUse, QueryParameters parameters)
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProvider.ExecuteValueListProjection(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 IPlan.ServiceContracts.PoolService.GetPoolListAndAdminDataList(List1& poolDataList, List
1& adminDataList, Int64 opCoIdIn, AuthenticationInfo authenticationInfo, ErrorInfo& errorInfo) in c:\Code\trunk\BusinessLogicService\ServiceContracts\Implementation\PoolService.cs:line 267