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

Add ability to change load strategy in whole application, like a global option #834

Closed
ceopaludetto opened this issue Sep 11, 2020 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@ceopaludetto
Copy link

Describe the solution you'd like
Will be much helpful, change the default load strategy behavior globally.

Talking about performance, the benchmarks are case specific, this occurs because some drivers are more performant in join statements and anothers are more performants in muiltiple statements, database structure and indexes can affect directly in this result too.

Some discussions I found searching this topic:
https://dba.stackexchange.com/questions/42998/are-individual-queries-faster-than-joins

The option chain can be:

Global option -> Model declaration option -> Query option

Mongo would ignore this option.

Describe alternatives you've considered
A global option like today naming strategies in init static method:

const orm = await MikroORM.init({
  loadStrategy: LoadStrategy.JOINED,
});
@ceopaludetto ceopaludetto added the enhancement New feature or request label Sep 11, 2020
@B4nan B4nan added good first issue Good for newcomers help wanted Extra attention is needed labels Sep 11, 2020
@B4nan B4nan closed this as completed in e4378ee Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants