mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-23 04:23:47 +08:00
Update navigate query
This commit is contained in:
@@ -289,7 +289,7 @@ namespace SqlSugar
|
|||||||
FieldValue = String.Join(",", ids),
|
FieldValue = String.Join(",", ids),
|
||||||
CSharpTypeName = listItemPkColumn.PropertyInfo.PropertyType.Name
|
CSharpTypeName = listItemPkColumn.PropertyInfo.PropertyType.Name
|
||||||
}));
|
}));
|
||||||
var sqlObj = GetWhereSql();
|
var sqlObj = GetWhereSql(navObjectNameColumnInfo.Navigat.Name);
|
||||||
|
|
||||||
if (list.Any() && navObjectNamePropety.GetValue(list.First()) == null)
|
if (list.Any() && navObjectNamePropety.GetValue(list.First()) == null)
|
||||||
{
|
{
|
||||||
@@ -312,7 +312,7 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private SqlInfo GetWhereSql()
|
private SqlInfo GetWhereSql(string properyName=null)
|
||||||
{
|
{
|
||||||
if (_ListCallFunc == null|| _ListCallFunc.Count==0) return new SqlInfo();
|
if (_ListCallFunc == null|| _ListCallFunc.Count==0) return new SqlInfo();
|
||||||
List<string> where = new List<string>();
|
List<string> where = new List<string>();
|
||||||
@@ -376,6 +376,15 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (properyName != null)
|
||||||
|
{
|
||||||
|
var fkColumnsInfo = entityInfo.Columns.FirstOrDefault(x => x.PropertyName == properyName);
|
||||||
|
if (fkColumnsInfo != null)
|
||||||
|
{
|
||||||
|
var fkName = fkColumnsInfo.DbColumnName;
|
||||||
|
AppColumns(result, queryable, fkName);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (method.Method.Name == "OrderByDescending")
|
else if (method.Method.Name == "OrderByDescending")
|
||||||
|
Reference in New Issue
Block a user