I have a morphedByMany multiplies relations

I have a morphedByMany relationship and this code Forms\Components\Select::make('products') ->multiple() ->relationship('products', 'name') ->getSearchResultsUsing(fn (string $search) => Product::where('name', 'like', "%{$search}%") ->orWhere('sku', 'like', "%{$search}%") ->limit(10)->pluck('name', 'id')) ->getOptionLabelUsing(fn ($value): ?string => Product::find($value)?->name), It is multiplying the entries in the table, it should sync instead of save?
2 Replies
Dan Harrin
Dan Harrin2y ago
maybe open an issue if you think its a bug
fede8100
fede8100OP2y ago
I was asking because I'm not sure if it's a bug or I'm doing something wrong ok, I will
Want results from more Discord servers?
Add your server