Query planner using join
Motivation
Solve the N + 1 issue, data loader is currently being used
Proposed Solutions
Option to solve it with join, similar to this: https://github.com/join-monster/join-monster
Additional Information
There are couple of other things if we can adapt from that library, which Im not sure if this seaography has implemented or not:
- Only select necessary fields, not *
- A way to specify or adding into the where condition
- Multiple order by
- Query through junction (or any relation)
@namnm Thanks for taking the time to discuss your concerns with us. Currently, we solve N+1 in most cases except in m-n relations. The project you suggested is amazing, but unfortunately, it follows a different approach. The scope of SeaQuery is to be combined with metadata provided by SeaORM. This limits our options, and sometimes, it is hard to move this information around. But I will keep your suggestion in mind and, in a future refactoring to change the background of how this project works.