Browse Source

Update QueryableFilter

pull/40/head
sunkaixuan 1 year ago
parent
commit
fa4d581d63
  1. 5
      Src/Asp.NetCore2/SqlSugar/Abstract/SqlBuilderProvider/QueryBuilder.cs

5
Src/Asp.NetCore2/SqlSugar/Abstract/SqlBuilderProvider/QueryBuilder.cs

@ -495,7 +495,8 @@ namespace SqlSugar
{
var easyInfo = JoinQueryInfos.FirstOrDefault(it =>
it.TableName.Equals(entityInfo.DbTableName, StringComparison.CurrentCultureIgnoreCase) ||
it.TableName.Equals(entityInfo.EntityName, StringComparison.CurrentCultureIgnoreCase));
it.TableName.Equals(entityInfo.EntityName, StringComparison.CurrentCultureIgnoreCase)||
it.EntityType==ChildType);
if (easyInfo == null)
{
if (ChildType.IsInterface && JoinQueryInfos.Any(it =>it.EntityType!=null&&it.EntityType.GetInterfaces().Any(z => z == ChildType)))
@ -529,7 +530,7 @@ namespace SqlSugar
var shortName = this.Builder.GetTranslationColumnName(joinInfo.ShortName.Trim()) + ".";
sql = sql.Replace(itName, shortName);
}
if (isInterface||joinInfo.TableName.EqualCase(entityInfo.EntityName)|| joinInfo.TableName.EqualCase(entityInfo.DbTableName))
if (isInterface||joinInfo.TableName.EqualCase(entityInfo.EntityName)|| joinInfo.TableName.EqualCase(entityInfo.DbTableName)||joinInfo.EntityType==ChildType)
{
var mysql = sql;
if (isSameName)

Loading…
Cancel
Save