Repeater and many-to-many (belognsToMany, morphsToMany) not saving
I have this issue where repeater cant handle
Having this structure with
belongsToMany
or morphToMany
relations.Having this structure with
Product
, Option
and a pivot table ConnectedModel
, and after a lot of debuging I think Filament does insert the rows in the pivot table but it deletes it for some reason when using ->saveRelationshipUsing()
, because is trying to save it again for some reason and there is no way as I see to disabled the auto relation save and allow only the manual save to avoid this.
Product class
Option class
ConnectedModel pivot class
Anyone have this problem and any idea how to handle this?4 Replies
up
ist there some package for handling that?
You have to save pivot table
HasMany.
Create a relation hasMany to Pivot on your model.
You could also do it nested
I think it is written on docs.
Yes, i get that but its a poly morphic many-to-many relation and its not easy to setup.
Shouldnt this be handled out of the box, it seemed like it would be.
I did it save to morphmany