Queryable.Select json array bug

This commit is contained in:
sunkaixuna
2022-01-07 13:28:38 +08:00
parent 8aa4ed37fc
commit 1f7d4121a3
4 changed files with 56 additions and 3 deletions

View File

@@ -34,6 +34,30 @@ namespace OrmTest
{
throw new Exception("unit error");
}
var db = Db;
db.CodeFirst.SetStringDefaultLength(200).InitTables(typeof(SqlSugarSelect.TestModel1));
db.CodeFirst.SetStringDefaultLength(200).InitTables(typeof(SqlSugarSelect.TestModel2));
#region
var isadd = !db.Queryable<TestModel1>().Any();
if (isadd)
{
db.Insertable(new SqlSugarSelect.TestModel1
{
Ids = new Guid []{ Guid.NewGuid() },
Titlt = "123"
}).ExecuteCommand();
db.Insertable(new SqlSugarSelect.TestModel2
{
Pid = 1
}).ExecuteCommand();
}
#endregion
#region Bug所在处
var rv = db.Queryable<SqlSugarSelect.TestModel2>()
.LeftJoin<SqlSugarSelect.TestModel1>((a, b) => a.Pid == b.Id)
.Select((a, b) => new { a, b }).ToList();
#endregion
}
}