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

【请求支持】@Navigate(value = RelationTypeEnum.ManyToOne) 在查询的时候能够转为 join 的形式执行 #334

Open
link2fun opened this issue Mar 13, 2025 · 0 comments

Comments

@link2fun
Copy link
Contributor

场景: 销售订单 关联有很多档案,算上订单表体的关联 多达30+
目前的场景是 依次加载每一个关联的实体,这就会执行 30+条SQL
实际 一般都是 toOne 查询,可以合并成 join 查询 以减少数据库请求次数 来提升执行效率

额外的, toOne 有时候可能是大表,可以默认 join 执行,用户可以更改为独立执行 属性可以放在 Navigate 注解上,实体的和DTO的是否join查询可以不一致

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

1 participant