Eager loading relationships in table
I currently have this piece of code:
When trying to search i get the error "SQLSTATE[42P01]: Undefined table: 7 ERROR: missing FROM-clause entry for table "person" LINE 1: ...nt(*) as aggregate from "volunteers" where (lower(person.fir... ^"
Does anyone have an insight in how i might fix this? I thought the $query->with() would already solve it but unfortuantly it doesn't
Solution:Jump to solution
Can you try using
person.lastname
as the name so that filament knows itβs a relation? π€9 Replies
Can you share the whole error or the stack trace?
And the DB table for
person
is person
?
Or is it people
? Then you should adjust the searchableOh my π
Going to have to check, but your propably right
Bumb, can provide bounty of $10 dollars if solved
Solution
Can you try using
person.lastname
as the name so that filament knows itβs a relation? π€your a genius! send some money on paypal
Thanks. Appreciate it!