Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在Oralce下面用树形查询,当树节点较多时,会报ORA-01795: 列表中的最大表达式数为 1000的错误 #843

Closed
shengqi opened this issue Aug 6, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@shengqi
Copy link

shengqi commented Aug 6, 2021

问题描述及重现步骤:

我在使用树形查询时,代码如下:
root.Children = fsql.Select()
.IncludeMany(t => t.Rules, then => then.IncludeMany(t => t.PreLinks))
.OrderBy(t => t.Order)
.Where(t => t.Id != WkfConstant.ROOT_ID)
.ToTreeList();
这个树下的子节点过多(我这里有5000多个)就会报ORA-01795的错误。看了一下生成的sql语句,应该是把所有的id都放到一个in条件里面了,pg没有数量限制,当把数据迁移到Oracle里,就跑不过去了。
附件里是报错的日志信息,请帮忙解决下,多谢。
Error2021-08-06.log

数据库的具体版本

Oracle11g

安装的包

FreeSql.All(2.5.100)

.net framework/. net core? 及具体版本

.net framework 4.8
@luoyunchong luoyunchong added the bug Something isn't working label Aug 7, 2021
@2881099
Copy link
Collaborator

2881099 commented Aug 28, 2021

有空提供一下直接运行的 demo ,谢谢

@shengqi
Copy link
Author

shengqi commented Aug 30, 2021

已经直接发给你qq了,麻烦看一下,谢谢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants