mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 12:28:15 +08:00
update test
This commit is contained in:
@ -112,6 +112,24 @@ WHERE (exists(SELECT 1
|
||||
limit 0,1)) AND (x.""Id"" = 100)
|
||||
limit 0,1))
|
||||
ORDER BY a.""Id"" DESC", sql);
|
||||
|
||||
using (userRepository.DataFilter.Disable("TenantQuery"))
|
||||
{
|
||||
sql = userRepository.Select
|
||||
.Where(i => i.DoorDevices.Any(x => x.Id == deviceId))
|
||||
.OrderByDescending(true, a => a.Id)
|
||||
.ToSql();
|
||||
Assert.Equal(@"SELECT a.""Id"", a.""TenantId""
|
||||
FROM ""issues1208_User"" a
|
||||
WHERE (exists(SELECT 1
|
||||
FROM ""issues1208_DoorDevice"" x
|
||||
WHERE (exists(SELECT 1
|
||||
FROM ""issues1208_DoorDeviceUser"" Mx_Ma
|
||||
WHERE (Mx_Ma.""DoorDeviceId"" = x.""Id"") AND (Mx_Ma.""UserId"" = a.""Id"")
|
||||
limit 0,1)) AND (x.""Id"" = 100)
|
||||
limit 0,1))
|
||||
ORDER BY a.""Id"" DESC", sql);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user