mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-26 10:49:20 +08:00
Delete Update Subquery Bug
This commit is contained in:
@@ -105,6 +105,14 @@ namespace OrmTest.Demo
|
||||
}).Where(p => p.Id == 10000).ExecuteCommand();
|
||||
|
||||
|
||||
var t22= db.Updateable<Student>().UpdateColumns(p => new Student()
|
||||
{
|
||||
SchoolId = SqlFunc.Subqueryable<Student>().Where(s=>s.SchoolId==p.Id).Select(s=>s.Id)
|
||||
}).Where(p => p.Id == 10000).ExecuteCommand();
|
||||
|
||||
|
||||
var t23= db.Updateable<Student>(new Student() { })
|
||||
.Where(p => p.SchoolId == SqlFunc.Subqueryable<Student>().Where(s => s.SchoolId == p.Id).Select(s => s.Id)).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,9 @@ namespace OrmTest.Demo
|
||||
var t5 = db.Deleteable<Student>().Where(it => it.Id > 1).Where(it => it.Id == 1).ExecuteCommand();
|
||||
|
||||
var t6 = db.Deleteable<Student>().AS("student").Where(it => it.Id > 1).Where(it => it.Id == 1).ExecuteCommandAsync();
|
||||
|
||||
|
||||
var t7 = db.Deleteable<Student>().Where(p => p.SchoolId == SqlFunc.Subqueryable<School>().Where(s => s.Id == p.SchoolId).Select(s => s.Id)).ExecuteCommand();
|
||||
t6.Wait();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user