mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 02:29:39 +08:00
Queryable.Select json array bug
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user