© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
2 replies
Mark Chaney

Table optional relationship and sorting

Table is Units, field is
TextColumn::make('floorplans.bedroom_size')->sortable();
TextColumn::make('floorplans.bedroom_size')->sortable();
. Right now when I try to sort, Im getting
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'bedroom_size' in 'field list'
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'bedroom_size' in 'field list'
with
select * from `units` where (`archived` is null) and `units`.`tenant_id` = 1 order by (select `bedroom_size` from `floorplans` where `units`.`floorplan_id` = `floorplans`.`id` and `floorplans`.`deleted_at` is null) asc limit 10 offset 0
select * from `units` where (`archived` is null) and `units`.`tenant_id` = 1 order by (select `bedroom_size` from `floorplans` where `units`.`floorplan_id` = `floorplans`.`id` and `floorplans`.`deleted_at` is null) asc limit 10 offset 0
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

relationship sorting in table
FilamentFFilament / ❓┊help
3y ago
Table column loses data when sorting by relationship
FilamentFFilament / ❓┊help
3y ago
Multiple Table Pagination And Sorting
FilamentFFilament / ❓┊help
9mo ago
Issue with Sorting a Summed Relationship Column in Filament Table
FilamentFFilament / ❓┊help
12mo ago