Browse Source

Synchronization code

pull/40/head
sunkaixuan 1 year ago
parent
commit
7e5b08fb8b
  1. 5
      Src/Asp.Net/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs

5
Src/Asp.Net/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs

@ -784,6 +784,11 @@ namespace SqlSugar
var whereString = expResult.GetResultString();
if (expression.ToString().Contains("Subqueryable()"))
{
if (ExpressionTool.GetParameters(expression).First().Type == typeof(T))
{
var tableName = this.SqlBuilder.GetTranslationColumnName(this.EntityInfo.DbTableName);
whereString = whereString.Replace(tableName, $"( SELECT * FROM {tableName}) ");
}
whereString = whereString.Replace(this.SqlBuilder.GetTranslationColumnName(expression.Parameters.First().Name) + ".", this.SqlBuilder.GetTranslationTableName(this.EntityInfo.DbTableName) + ".");
}
else if (expResult.IsNavicate)

Loading…
Cancel
Save