- Laravel Version: v9.36.2
- Nova Version: 4.16.1
- PHP Version: 8.1.11
- Database Driver & Version: MySQL 8
- Operating System and Version: MacOS
- Browser type and version: Chrome 106.0.5249.119
- Reproduction Repository: none
Description:
BelongsTo relationship returning 30k+ results when editing a resource with relationship already set. Also, when creating a resource, it returns tons of results.
Query params:
current: 19239
first: true
search:
withTrashed: false
resourceId: 829
viaResource:
viaResourceId:
viaRelationship:
editing: true
editMode: update
I know I can limit the results with $relatableSearchResults, but then the field is just empty. I have upgraded from Laravel 3, not sure if that's related.
Detailed steps to reproduce the issue on a fresh Nova installation:
Create a BelongsTo relationship with 30k+ rows.