- 
                Notifications
    You must be signed in to change notification settings 
- Fork 892
Closed
Description
问题描述及重现代码:
// c# code
//先定义一个部门列表
public class Department
{
        /// <summary>
        /// 组织架构Id
        /// </summary>
        [Column(IsPrimary  = true)]
        public int DepartmentId { get; set; }
      
}
//代码查询部分
public void action(object parama)
{
            var depList = new List<int>();
            for (int i = 0; i < 50000; i++)
            {
                depList.Add(i);
            }
            var depselect = await  _freesql.Select<Department>()
                .WhereIf(true, x => depList != null && depList.Contains(x.DepartmentId))
                .ToListAsync();
}
调上面这个方法,返回"54011: ROW expressions can have at most 1664 entries\r\n\r\nPOSITION: 265"
看一下翻译过来的sql,大概意思是
select * from department a where (0,1,2,......4999) is not null and a.departmentid in (0,1,2,......4999)导致数据库层面报54011

#### 数据库版本
pg13
#### 安装的Nuget包
3.2.680
#### .net framework/. net core? 及具体版本
net8Metadata
Metadata
Assignees
Labels
No labels