© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•8mo ago•
9 replies
sdousley

RelationManager creating "Parent" error

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?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Refetch RelationManager data on parent resource save
FilamentFFilament / ❓┊help
3y ago
Hide column in relationmanager based on parent model
FilamentFFilament / ❓┊help
3y ago
Attach action error in RelationManager
FilamentFFilament / ❓┊help
2y ago