feat: auto-include primary key in CrudFactory searchable_fields (#130)

This commit is contained in:
d3vyce
2026-03-12 20:21:32 +01:00
committed by GitHub
parent dde5183e68
commit 26d649791f
3 changed files with 24 additions and 4 deletions

View File

@@ -212,6 +212,9 @@ Two search strategies are available, both compatible with [`offset_paginate`](..
### Full-text search
!!! info "Added in `v2.2.1`"
The model's primary key is always included in `searchable_fields` automatically, so searching by ID works out of the box without any configuration. When no `searchable_fields` are declared, only the primary key is searched.
Declare `searchable_fields` on the CRUD class. Relationship traversal is supported via tuples:
```python