Many-to-many pivot columns not countenanced when column name clashes with another parent column
Package
filament/filament
Package Version
latest
Laravel Version
latest
Livewire Version
latest
PHP Version
PHP 8.3
Problem description
When listing contents of a many-to-many relationship in a relation manager table, and the pivot table has a column name that the parent conincidentally has a column with same name, content of the parent table is listed instead of the pivot table's
This also affect when the pivot table is listed with TextInputColumn. It also edits the wrong column - the parent column instead of the pivot column.
Expected behavior
When listing contents of a many-to-many relationship in a relation manager table, and the pivot table has a column name that the parent conincidentally has a column with same name, content of the pivot table should be listed
Steps to reproduce
- Clone the repo https://github.com/damms005/delete-me-quick-create
-
php artisan migrate:fresh --seed - Open project in browser
- Login and go to the
/admin/users/1/editendpoint to edit the first user - Check the content Todos relation manager table and notice that the
Due dateis the due date of theTodomodel, not the due date of thetodo_usertable - which is the due date the assignee is due to complete the todo, rather than the due date on the todo itself which is the date the todo is due to have been completed irrepsective of which assignee completes it. This use-case is more of multiple users competing to complete a todo in record time, ideally before the todo's due date
Reproduction repository (issue will be closed if this is not valid)
https://github.com/damms005/delete-me-quick-create
Relevant log output
No response
Donate 💰 to fund this issue
- You can donate funding to this issue. We receive the money once the issue is completed & confirmed by you.
- 100% of the funding will be distributed between the Filament core team to run all aspects of the project.
- Thank you in advance for helping us make maintenance sustainable!