Hello everyone !
I have the following model :
class Participant
belongs_to :client, optional: true
end
class Client
has_many :participants
end
as a participant
can
Displaying the collection results in the error " The request to your server either failed or returned invalid data."
Looking at the stacktrace, it seems that the forest_liana tries to order the participant
table with the client id, even though it is an optional relationship
Participant Load (0.9ms) SELECT “participants”.* FROM “participants” ORDER BY “clients”.“id” DESC LIMIT $1 OFFSET $2 [[“LIMIT”, 100], [“OFFSET”, 0]]
[2023-05-09 17:49:17] Forest Records Index error: PG::UndefinedTable: ERROR: missing FROM-clause entry for table “clients”
LINE 1: …ECT “participants”.* FROM “participants” ORDER BY “clients”…
The request sent by the dashboard is the following :
forest/Participant?timezone=America%2FMerida&fields%5BParticipant%5D=id%2Cfirstname%2Clastname&page%5Bnumber%5D=1&page%5Bsize%5D=100&sort=-client.id
I have the following version for the forest_liana gem : 8.0.6 and using rails 6.1.7.3
Thanks for your help