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

Option to use joins instead of multiple calls for relations. #491

Open
akshatdubeysf opened this issue Nov 1, 2021 · 1 comment
Open
Labels

Comments

@akshatdubeysf
Copy link
Contributor

Suggestion

An option to use joins instead of multiple calls for relations would be useful for performance reasons and would also not effect multi datasources setups by default.

Use Cases

We are using a lot of DB calls with nested relations and each of those relations are fetched using extra DB calls which could be avoided. I understand the reasoning behind not using joins but I believe there should at least be an option to include relations through joins when required.

Examples

The syntax could be something like this -

"include": [
{
"relation": "child",
"join": "true"
}
],

or this could be defined at the model level in the relation decorator.

Acceptance criteria

TBD - will be filled by the team.

@amitlissack
Copy link

Is it true that relation queries don't use joins?

Is this a loopback issue or a postgres connector issue?

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

No branches or pull requests

2 participants