Bit of an odd scenario, but this is what suits us better. I have an IP Address model, and a Host model. Now, an IP can obviously only be assigned to one Host, but a Host can have multiple IP addresses.
As such, I have them setup with a BelongsTo relationship on the IP address, and a HasMany relationship on the Host.
Now, I am going into the IPAddressResource View page, and using the relation manager to create a host, but getting the error
Call to undefined method Illuminate\Database\Eloquent\Relations\BelongsTo::save()
Call to undefined method Illuminate\Database\Eloquent\Relations\BelongsTo::save()
Obviously, I'm doing something wrong, but not entirely sure what/how to resolve it
Edit: I think this may be a bug in the Filament\Tables\Actions\CreateAction class (line 86), calling
$relationship->save($record)
$relationship->save($record)
when - as this is a BelongsTo, it should be
$relationship->associate($record)
$relationship->associate($record)
Obviously for the majority of use cases of relation managers, save is correct, but I suspect there needs to be some sort of check of the relation type to determine which method to use?