Issue when relation more than one same relation and no results.
maiconmva opened this issue · 3 comments
maiconmva commented
thevalo commented
PetengDedet commented
hussain-jtr commented
I have same issue with laravel-medialibrary
my code:
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
It should use N+1 problem detection for same queries not for same model




