We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello, i think i found a issue,
I have this model with 3 relations with Person Model.
and when i filter to show some record without relations with persons the N+1 log shows...
But if u see the querie, shows the correct way, its not a N+1 error....
this is the n+1 log;
The text was updated successfully, but these errors were encountered:
Do we have the same problem?
The query: $subscription = Subscription::with('transaction')->where('tenant_id', tenant('id'))->first();
$subscription = Subscription::with('transaction')->where('tenant_id', tenant('id'))->first();
Sorry, something went wrong.
Yes it is. Have similar problem. It is a false positive.
In my case below query is exactly the same but actually its a different context.
The first one is for getting post_author and the second one is for updater.
post_author
updater
I have same issue with laravel-medialibrary
laravel-medialibrary
my code: Activity::with(['categories', 'categories.image', 'categories.bannerImage'])->get()
Activity::with(['categories', 'categories.image', 'categories.bannerImage'])->get()
saying:
local.INFO: Model: App\Models\Category Relation: Spatie\MediaLibrary\MediaCollections\Models\Media Num-Called: 2 Call-Stack:...
For now I set QUERY_DETECTOR_THRESHOLD=2 but what if i need some more eager loading with different relationship like categories.featureImage
QUERY_DETECTOR_THRESHOLD=2
categories.featureImage
It should use N+1 problem detection for same queries not for same model
N+1
@hussainalihussain
No branches or pull requests
Hello, i think i found a issue,
I have this model with 3 relations with Person Model.
and when i filter to show some record without relations with persons the N+1 log shows...
But if u see the querie, shows the correct way, its not a N+1 error....

this is the n+1 log;

The text was updated successfully, but these errors were encountered: