© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
3 replies
harps

Relation manager ignored global scope

I have a model called
gaspipesurvey
gaspipesurvey
with a large GeoJson object column in the database. (up to 5mb).

I have excluded the column using a global scope which now only returns the fields I need and this makes all the tables work fast.

But I have added some relationships to the model and added then included them using
getRelations()
getRelations()
after adding each relationship each tab takes a long time to load when the GeoJson is large.

Using debugbar I can see that the following query is called twice.

select * from 
select * from 
gas_pipe_surveys
 where 
 where 
gas_pipe_surveys
.
.
id
 = 375 limit 1
 = 375 limit 1


1. I wouldn't expect to see
select *
select *
on this becuae of the global scope.
2. I'm not sure why it's called twice.

Backtrace only shows the following

17 vendor/livewire/livewire/src/Features/SupportModels/ModelSynth.php:57
18. /vendor/livewire/livewire/src/Mechanisms/HandleComponents/HandleComponents.php:218
19. /vendor/livewire/livewire/src/Mechanisms/HandleComponents/HandleComponents.php:217
20. /vendor/livewire/livewire/src/Mechanisms/HandleComponents/Synthesizers/ArraySynth.php:30
21. /vendor/livewire/livewire/src/Mechanisms/HandleComponents/HandleComponents.php:218
17 vendor/livewire/livewire/src/Features/SupportModels/ModelSynth.php:57
18. /vendor/livewire/livewire/src/Mechanisms/HandleComponents/HandleComponents.php:218
19. /vendor/livewire/livewire/src/Mechanisms/HandleComponents/HandleComponents.php:217
20. /vendor/livewire/livewire/src/Mechanisms/HandleComponents/Synthesizers/ArraySynth.php:30
21. /vendor/livewire/livewire/src/Mechanisms/HandleComponents/HandleComponents.php:218


If I remove the relationships everything works ok.
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

global scopes ignored on grouping
FilamentFFilament / ❓┊help
3y ago
Global Scopes not being ignored on select
FilamentFFilament / ❓┊help
2y ago
Relation Manager
FilamentFFilament / ❓┊help
2y ago
Relation Manager
FilamentFFilament / ❓┊help
3y ago