mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
Update auto with bug
This commit is contained in:
parent
549ea05058
commit
ba2a885f98
@ -102,6 +102,7 @@
|
||||
<Compile Include="UnitTest\UCustom01.cs" />
|
||||
<Compile Include="UnitTest\UCustom02.cs" />
|
||||
<Compile Include="UnitTest\UCustom03.cs" />
|
||||
<Compile Include="UnitTest\UCustom07.cs" />
|
||||
<Compile Include="UnitTest\UCustom06.cs" />
|
||||
<Compile Include="UnitTest\UCustom05.cs" />
|
||||
<Compile Include="UnitTest\UCustom04.cs" />
|
||||
|
@ -31,6 +31,7 @@ namespace OrmTest
|
||||
}
|
||||
public static void Init()
|
||||
{
|
||||
UCustom07.Init();
|
||||
UCustom01.Init();
|
||||
UCustom02.Init();
|
||||
UCustom03.Init();
|
||||
|
42
Src/Asp.Net/SqlServerTest/UnitTest/UCustom07.cs
Normal file
42
Src/Asp.Net/SqlServerTest/UnitTest/UCustom07.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using OrmTest.UnitTest.Models;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OrmTest
|
||||
{
|
||||
public class UCustom07
|
||||
{
|
||||
public static void Init()
|
||||
{
|
||||
var db = NewUnitTest.Db;
|
||||
db.CurrentConnectionConfig.MoreSettings = new ConnMoreSettings() {
|
||||
IsWithNoLockQuery = true
|
||||
};
|
||||
var query6 = db.Queryable<Order>().LeftJoin(db.Queryable<OrderItem>(),(m, i) => m.Id == i.OrderId)
|
||||
.ToList();
|
||||
|
||||
|
||||
}
|
||||
public class Unit06
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Company { get; set; }
|
||||
public string Work { get; set; }
|
||||
}
|
||||
public class UnitPeople
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public UnitJobClass Job { get; set; }
|
||||
}
|
||||
|
||||
public class UnitJobClass
|
||||
{
|
||||
public string Company { get; set; }
|
||||
public string Work { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
@ -483,11 +483,12 @@ namespace SqlSugar
|
||||
name = this.AsTables.First(it => it.Key == name).Value;
|
||||
}
|
||||
}
|
||||
var isSubQuery = name!=null&& name.StartsWith("(") && name.EndsWith(")");
|
||||
return string.Format(
|
||||
this.JoinTemplate,
|
||||
joinInfo.JoinType.ToString() + UtilConstants.Space,
|
||||
Builder.GetTranslationTableName(name) + UtilConstants.Space,
|
||||
joinInfo.ShortName + UtilConstants.Space + (TableWithString == SqlWith.Null ? " " : TableWithString),
|
||||
joinInfo.ShortName + UtilConstants.Space + (TableWithString == SqlWith.Null|| isSubQuery ? " " : TableWithString),
|
||||
joinInfo.JoinWhere);
|
||||
}
|
||||
public virtual void Clear()
|
||||
|
Loading…
Reference in New Issue
Block a user