mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-15 20:49:31 +08:00
Update IsCorrectErrorSqlParameterName
This commit is contained in:
parent
12249dee26
commit
33a504019f
@ -780,7 +780,14 @@ namespace SqlSugar
|
|||||||
string shortName = expression.Expression.ToString();
|
string shortName = expression.Expression.ToString();
|
||||||
string fieldName = expression.Member.Name;
|
string fieldName = expression.Member.Name;
|
||||||
fieldName = this.Context.GetDbColumnName(expression.Expression.Type.Name, fieldName);
|
fieldName = this.Context.GetDbColumnName(expression.Expression.Type.Name, fieldName);
|
||||||
fieldName = Context.GetTranslationColumnName(shortName + UtilConstants.Dot + fieldName);
|
if (UtilMethods.GetMoreSetting(this.Context).IsCorrectErrorSqlParameterName)
|
||||||
|
{
|
||||||
|
fieldName = Context.GetTranslationColumnName(shortName) + UtilConstants.Dot + Context.GetTranslationColumnName(fieldName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fieldName = Context.GetTranslationColumnName(shortName + UtilConstants.Dot + fieldName);
|
||||||
|
}
|
||||||
return fieldName;
|
return fieldName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1821,5 +1821,10 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static ConnMoreSettings GetMoreSetting(ExpressionContext context)
|
||||||
|
{
|
||||||
|
return context?.SugarContext?.Context?.CurrentConnectionConfig?.MoreSettings ?? new ConnMoreSettings();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user