© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
5 replies
Randak

Editing a many-to-many attachment with pivot attributes.

I have a Creature and Shield model with a CreatureShield pivot table. The belongsToMany relationship is defined in both Models. I can attach and detach from the Creature model, including adding pivot table fields for new attachments. When I try to edit an existing attachment I get this error: Filament\Support\Services\RelationshipJoiner::prepareQueryForNoConstraints(): Argument #1 ($relationship) must be of type Illuminate\Database\Eloquent\Relations\Relation, null given, called in /var/www/html/vendor/filament/forms/src/Components/Select.php

This is my first Laravel project and I'm a hobby coder so please excuse my lack of knowledge.
Solution
I solved the problem by removing the "shield_id" select statement.
Jump to solution
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

Creating with pivot attributes
FilamentFFilament / ❓┊help
2y ago
Attach Pivot attributes
FilamentFFilament / ❓┊help
2y ago
Save relationship with pivot attributes/columns
FilamentFFilament / ❓┊help
3y ago
Sptie Translatable Pivot Attributes
FilamentFFilament / ❓┊help
2y ago