diff --git a/Src/Asp.Net/SqlServerTest/UnitTest/UnitSelectN.cs b/Src/Asp.Net/SqlServerTest/UnitTest/UnitSelectN.cs index 4b96e88ab..36a046232 100644 --- a/Src/Asp.Net/SqlServerTest/UnitTest/UnitSelectN.cs +++ b/Src/Asp.Net/SqlServerTest/UnitTest/UnitSelectN.cs @@ -43,7 +43,22 @@ namespace OrmTest { throw new Exception("unit error"); } - + var data3 = db.Queryable() + .LeftJoin((b, a) => b.AId == a.AId) + .LeftJoin((b, a, aa) => a.AId == aa.AId) + .LeftJoin((b, a, aa, bb) => bb.BId == b.BId) + .Select((b, a, aa, bb) => new + { + b=b.BId, + A=new ADTO() { AId=a.AId }, + B = new BDTO{ BId = b.BId, BName = b.BName, AId = a.AId } + }) + .ToList(); + if (data3.First().B.BId != 1 && data3.First().B.BName != "a"&& data3.First().b!=1) + { + throw new Exception("unit error"); + } + } [SqlSugar.SugarTable("unita1")] public class A