Filtering by a related table column changes the table id
Hi, I'm following the Owners, Pets, Treatments demo and I'm having issues creating a simple toggle filter by owner's email for the Patients resource.
My problem is that after applying filter, the Patients table now uses the owner's id instead of the patients id. What I'm doing wrong?
My problem is that after applying filter, the Patients table now uses the owner's id instead of the patients id. What I'm doing wrong?




Solution
You are adding a join with a table that also has an ID. Try adding a
select('your_table.*') via the table query