PERSISTENCE FEATURE
Filtering
Mark a property #[Filterable] and the ORM handles the rest — no manual WHERE clauses.
Feature Guide
A quick orientation block that answers the essential questions: what this feature does, how it works, why it matters, and the key concepts behind it.
What this does
Mark a property #[Filterable] and the ORM handles the rest — no manual WHERE clauses.
Filter Criteria
Live filtered result set
No filters applied — showing the broad demo dataset.
| Name | Price | Status |
|---|---|---|
| Air Purifier | $149.99 | active |
| Domain-Driven Design | $54.99 | active |
| Ergonomic Chair | $299.99 | active |
| Foam Roller | $29.99 | active |
| Head First Design Patterns | $49.99 | active |
| Linen Shirt | $54.99 | active |
Verified against Semitexa Ultimate 2026.09.19.1020
Filtering
The #[Filterable] attribute on a ResourceModel property registers that column as a valid filter target. The ORM builds the WHERE clause automatically from the declared filter criteria.
How it works
A resource implements FilterableResourceInterface and uses FilterableTrait. Marking a property #[Filterable] makes that column available to getFilterCriteria(). Repositories pass the criteria to the query builder, which compiles the WHERE clause without manual string construction. Handlers simply pass payload values through to the repository.
Why this matters
Manual WHERE clause construction per property is repetitive and error-prone. A single attribute declaration keeps filter capability co-located with the column definition, and the ORM ensures that only declared filterable columns can appear in generated queries.