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

SqlFunc.Subqueryable 跨库子查询联表无效 #1246

Closed
dasiniwoyebushuo opened this issue May 20, 2024 · 2 comments
Closed

SqlFunc.Subqueryable 跨库子查询联表无效 #1246

dasiniwoyebushuo opened this issue May 20, 2024 · 2 comments

Comments

@dasiniwoyebushuo
Copy link

跨库单表有效:
SqlFunc.Subqueryable<FlowBoxInfo>().AsWithAttr() .Where(f => a.IncomingId.Equals(f.IncomingId)) .Sum(f => f.Qty),
跨库多表无效:
SqlFunc.Subqueryable<FlowBoxInfo>().AsWithAttr() .LeftJoin<BoxInfo>((f, g) => f.BoxInfoId.Equals(g.Id) && g.StorageInfoId.HasValue) .LeftJoin<StorageInfo>((f, g, h) => h.Id.Equals(g.StorageInfoId)) .Where(f => a.IncomingId.Equals(f.IncomingId)) .Sum(f => f.Qty),

@DotNetNext
Copy link
Owner

DotNetNext commented May 20, 2024

支持中 ,先可以用.LeftJoin((f, g, h) => h.Id.Equals(g.StorageInfoId) ,"表名")

@DotNetNext
Copy link
Owner

SqlSugarCore 5.1.4.157-preview06

更新最新预览版本已支持

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants