© 2026 Hedgehog Software, LLC

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

QueryBuilder Filter returns nothing

Hi,

I have this simple RealtionshipContraint in my filter querybuilder. The items of the relation is displayed correctly in the select, but if one item is select with "is" operator, it doesn't return anything.

To double check: It disabled / removed all other filters to avoid possible conflicts. But it still doesn't work:
                QueryBuilder::make()
                    ->constraints([
                        QueryBuilder\Constraints\TextConstraint::make('customer.name'),
                        QueryBuilder\Constraints\RelationshipConstraint::make('article')
                            ->emptyable()
                            ->selectable(QueryBuilder\Constraints\RelationshipConstraint\Operators\IsRelatedToOperator::make()
                                ->titleAttribute('title'))]),
                QueryBuilder::make()
                    ->constraints([
                        QueryBuilder\Constraints\TextConstraint::make('customer.name'),
                        QueryBuilder\Constraints\RelationshipConstraint::make('article')
                            ->emptyable()
                            ->selectable(QueryBuilder\Constraints\RelationshipConstraint\Operators\IsRelatedToOperator::make()
                                ->titleAttribute('title'))]),


"is empty" and "is not empty" works.

The relationship itself works too, when it is used in other filters or fields.

Can anyone help?
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

Issue with QueryBuilder Table Filter
FilamentFFilament / ❓┊help
8mo ago
Multiple Joins and filter with QueryBuilder
FilamentFFilament / ❓┊help
2y ago
Select filter in QueryBuilder for nested relationship
FilamentFFilament / ❓┊help
3mo ago
[QueryBuilder] How can you filter a multi relationship?
FilamentFFilament / ❓┊help
2y ago