-
Notifications
You must be signed in to change notification settings - Fork 29
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
Fix: When using SelectPlus with a relationship in index, it creates a N+1 problem. #70
base: master
Are you sure you want to change the base?
Conversation
Check if the relation is already loaded to prevent redundant loading.
Hello, @ralphschindler ! Can you please take a look at this? Many thanks for considering my request. |
Hi! I was looking at this last week, is there a reason you closed? |
I thought that it was going nowhere. I can reopen it if it will be considered. Should I? |
…er, etc." This reverts commit 978e7bc.
@ralphschindler Here it is. |
@ralphschindler Is there something missing? Do you need more context? |
@ralphschindler please take a look, also waiting on this. |
Hi @HenriqueSPin, I opened the |
This pull request prevents redundant database queries when displaying SelectPlus in index fields. Currently, an extra query is executed per line due to repeated loading of relationships, even when eager loading is utilized with
$with
. This update ensures that relationships are only loaded if they have not been previously loaded, optimizing performance.