You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a query like this, expecting 0 rows, it actually returns all rows.:
var teams = new Dictionary<Guid, Team>();
var ids = Array.Empty<Guid>();
var tp = await _session
.Query<TeamPlayer>()
.Include(x => x.TeamId, teams)
.Where(x => x.Id.IsOneOf(ids) && x.IsAdministrator == true)
.Select(x => x.PlayerId)
.ToListAsync();
Generated sql with .Select
drop table if exists mt_temp_id_list1;
create temp table mt_temp_id_list1 as (
select d.id, d.data, d.mt_version, d.tenant_id, d.mt_deleted, d.mt_deleted_at, d.player_id, d.team_id, d.pending_invitation, d.is_administrator
from public.mt_doc_teamplayers as d
where (d.mt_deleted = False and d.tenant_id = $1 and d.id = ANY($2) and d.is_administrator = $3)
);
: *DEFAULT*
:
: True
select d.id, d.data, d.mt_version, d.tenant_id, d.mt_deleted, d.mt_deleted_at
from public.mt_doc_team as d
where (d.mt_deleted = False and d.tenant_id = $1 and d.id in (select d.team_id from mt_temp_id_list1 as d));
: *DEFAULT*
select d.player_id from public.mt_doc_teamplayers as d
Generated sql without .Select
-- Query without .Select(x => x.PlayerId)
drop table if exists mt_temp_id_list1;
create temp table mt_temp_id_list1 as (
select d.id, d.data, d.mt_version, d.tenant_id, d.mt_deleted, d.mt_deleted_at, d.player_id, d.team_id, d.pending_invitation, d.is_administrator
from public.mt_doc_teamplayers as d
where (d.mt_deleted = False and d.tenant_id = $1 and d.id = ANY($2) and d.is_administrator = $3)
);
: *DEFAULT*
:
: True
select d.id, d.data, d.mt_version, d.tenant_id, d.mt_deleted, d.mt_deleted_at
from public.mt_doc_team as d
where (d.mt_deleted = False and d.tenant_id = $1 and d.id in (select d.team_id from mt_temp_id_list1 as d));
: *DEFAULT*
select d.id, d.data, d.mt_version, d.tenant_id, d.mt_deleted, d.mt_deleted_at, d.player_id, d.team_id, d.pending_invitation, d.is_administrator from mt_temp_id_list1 as d
The text was updated successfully, but these errors were encountered:
Given a query like this, expecting 0 rows, it actually returns all rows.:
Generated sql with .Select
Generated sql without .Select
The text was updated successfully, but these errors were encountered: