@ -278,7 +278,7 @@ namespace SqlSugar
{
var navList = selector ( this . Context . Queryable < object > ( ) . AS ( navEntityInfo . DbTableName ) . Where ( conditionalModels ) ) ;
var G roupQuery = ( from l in list
var g roupQuery = ( from l in list
join n in navList
on navColumn . PropertyInfo . GetValue ( l ) . ObjToString ( )
equals navPkColumn . PropertyInfo . GetValue ( n ) . ObjToString ( )
@ -287,7 +287,7 @@ namespace SqlSugar
l ,
n
} ) . ToList ( ) ;
foreach ( var item in G roupQuery)
foreach ( var item in g roupQuery)
{
// var setValue = navList.FirstOrDefault(x => navPkColumn.PropertyInfo.GetValue(x).ObjToString() == navColumn.PropertyInfo.GetValue(item).ObjToString());
@ -325,7 +325,7 @@ namespace SqlSugar
{
//var setValue = navList
// .Where(x => navColumn.PropertyInfo.GetValue(x).ObjToString() == listItemPkColumn.PropertyInfo.GetValue(item).ObjToString()).ToList();
var G roupQuery = ( from l in list
var g roupQuery = ( from l in list
join n in navList
on listItemPkColumn . PropertyInfo . GetValue ( l ) . ObjToString ( )
equals navColumn . PropertyInfo . GetValue ( n ) . ObjToString ( )
@ -334,7 +334,7 @@ namespace SqlSugar
l ,
n
} ) . GroupBy ( it = > it . l ) . ToList ( ) ;
foreach ( var item in G roupQuery)
foreach ( var item in g roupQuery)
{
if ( sqlObj . MappingExpressions . HasValue ( ) )
@ -569,6 +569,10 @@ namespace SqlSugar
{
Check . ExceptionEasy ( $".Where({childExpression}) no support {rootShortName}.Field, Use .MappingField" , $".Where({childExpression})禁止出{rootShortName}.字段 , 你可以使用.MappingField(z=>z.字段,()=>{rootShortName}.字段) 与主表字段进行过滤" ) ;
}
else if ( rootShortName . HasValue ( ) & & childExpression . ToString ( ) . Contains ( $"({rootShortName}." ) )
{
Check . ExceptionEasy ( $".Where({childExpression}) no support {rootShortName}.Field, Use .MappingField" , $".Where({childExpression})禁止出{rootShortName}.字段 , 你可以使用.MappingField(z=>z.字段,()=>{rootShortName}.字段) 与主表字段进行过滤" ) ;
}
}
private static string GetShortName ( Expression expression1 )