filament/filament
v3.2.90
v11.10.0
v3.5.0
PHP 8.3.8
Relationship data is not saved as expected when using multiple form components with the same relationship.
Example:
Forms\Components\Section::make()
->relationship('sale')
->statePath('firstSection')
->schema([
// ...
]),
Forms\Components\TextInput::make('name'),
Forms\Components\Section::make()
->relationship('sale')
->statePath('secondSection')
->schema([
// Fields in this section are completely ignored
]),
I have also tried to use the same name for statePath
.
The same issue was previously discussed here: #10536
The approach of giving the different section both relationship
and statePath
doesn't seem to work (#10536 (comment)).
According to #10536 (comment) the example above should work.
See example above or linked repo.
https://github.com/martin-ro/filament-relationship-multiple-components
SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: sales.price (Connection: sqlite, SQL: insert into "sales" ("name", "updated_at", "created_at") values (voluptas, 2024-06-18 06:25:00, 2024-06-18 06:25:00))
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too