Filament\Support\Services\RelationshipJoiner::prepareQueryForNoConstraints():

Hi guys .. i'm on ContratoResource file wich list contracts. Each contract can have one item created. I create an action to open a modal to create that item but when i click on action button i recieve this error. Anyone can help me ?
No description
No description
No description
9 Replies
Patrick
Patrick9mo ago
probably the relation in your form has a typo mm cant spot it tho does the relation work outside of filament? so can you like instantiate a model and do $model->contrato ?
CT
CT9mo ago
also be sure to check that the inverse of the relationship is also setup correctly, I found sometimes that is necessary
Patrick
Patrick9mo ago
ye probably something like that error message you get is a bit meh
[BR]Darkriders
[BR]DarkridersOP9mo ago
No description
[BR]Darkriders
[BR]DarkridersOP9mo ago
No description
[BR]Darkriders
[BR]DarkridersOP9mo ago
both relation are correct and working 😕 totally Seems like it's considering the Contrato model instead of ContratoFornecedorItem model how can i set a model to form in an action ?
Patrick
Patrick9mo ago
if you do $record you gt the wrong one or?
[BR]Darkriders
[BR]DarkridersOP9mo ago
in action, if i remove the ContratoFornecedorItem type and just let $record it brings me back the Contrato in the row. If i let ContratoFornecedorItem and remove the code inside form(), they return that error
No description
Patrick
Patrick9mo ago
If you want you can send me the entire resource file and i'll take a look tonight when i'm home or share the repo so i can fork it if thats possibl
Want results from more Discord servers?
Add your server