mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-18 17:48:11 +08:00
.AS() Special case BUG
This commit is contained in:
@@ -62,6 +62,10 @@ namespace SqlSugar
|
|||||||
IsAs = true;
|
IsAs = true;
|
||||||
OldMappingTableList = this.Context.MappingTables;
|
OldMappingTableList = this.Context.MappingTables;
|
||||||
this.Context.MappingTables = this.Context.Utilities.TranslateCopy(this.Context.MappingTables);
|
this.Context.MappingTables = this.Context.Utilities.TranslateCopy(this.Context.MappingTables);
|
||||||
|
if (this.Context.MappingTables.Any(it => it.EntityName == entityName))
|
||||||
|
{
|
||||||
|
this.Context.MappingTables.Add(this.Context.MappingTables.First(it => it.EntityName == entityName).DbTableName, tableName);
|
||||||
|
}
|
||||||
this.Context.MappingTables.Add(entityName, tableName);
|
this.Context.MappingTables.Add(entityName, tableName);
|
||||||
return this; ;
|
return this; ;
|
||||||
}
|
}
|
||||||
|
@@ -145,6 +145,10 @@ namespace SqlSugar
|
|||||||
IsAs = true;
|
IsAs = true;
|
||||||
OldMappingTableList = this.Context.MappingTables;
|
OldMappingTableList = this.Context.MappingTables;
|
||||||
this.Context.MappingTables = this.Context.Utilities.TranslateCopy(this.Context.MappingTables);
|
this.Context.MappingTables = this.Context.Utilities.TranslateCopy(this.Context.MappingTables);
|
||||||
|
if (this.Context.MappingTables.Any(it => it.EntityName == entityName))
|
||||||
|
{
|
||||||
|
this.Context.MappingTables.Add(this.Context.MappingTables.First(it => it.EntityName == entityName).DbTableName, tableName);
|
||||||
|
}
|
||||||
this.Context.MappingTables.Add(entityName, tableName);
|
this.Context.MappingTables.Add(entityName, tableName);
|
||||||
return this; ;
|
return this; ;
|
||||||
}
|
}
|
||||||
|
@@ -1019,6 +1019,10 @@ namespace SqlSugar
|
|||||||
IsAs = true;
|
IsAs = true;
|
||||||
OldMappingTableList = this.Context.MappingTables;
|
OldMappingTableList = this.Context.MappingTables;
|
||||||
this.Context.MappingTables = this.Context.Utilities.TranslateCopy(this.Context.MappingTables);
|
this.Context.MappingTables = this.Context.Utilities.TranslateCopy(this.Context.MappingTables);
|
||||||
|
if (this.Context.MappingTables.Any(it => it.EntityName == entityName))
|
||||||
|
{
|
||||||
|
this.Context.MappingTables.Add(this.Context.MappingTables.First(it => it.EntityName == entityName).DbTableName, tableName);
|
||||||
|
}
|
||||||
this.Context.MappingTables.Add(entityName, tableName);
|
this.Context.MappingTables.Add(entityName, tableName);
|
||||||
this.QueryableMappingTableList = this.Context.MappingTables;
|
this.QueryableMappingTableList = this.Context.MappingTables;
|
||||||
return this;
|
return this;
|
||||||
|
@@ -64,6 +64,9 @@ namespace SqlSugar
|
|||||||
IsAs = true;
|
IsAs = true;
|
||||||
OldMappingTableList = this.Context.MappingTables;
|
OldMappingTableList = this.Context.MappingTables;
|
||||||
this.Context.MappingTables = this.Context.Utilities.TranslateCopy(this.Context.MappingTables);
|
this.Context.MappingTables = this.Context.Utilities.TranslateCopy(this.Context.MappingTables);
|
||||||
|
if (this.Context.MappingTables.Any(it => it.EntityName == entityName)) {
|
||||||
|
this.Context.MappingTables.Add(this.Context.MappingTables.First(it => it.EntityName == entityName).DbTableName, tableName);
|
||||||
|
}
|
||||||
this.Context.MappingTables.Add(entityName, tableName);
|
this.Context.MappingTables.Add(entityName, tableName);
|
||||||
return this; ;
|
return this; ;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user