My relation manager's create action is constantly trying to put audit_id as (1), instead of the id of the audit (17) for which the agenda is being created. I have never ever encountered such an error and I have no idea what I am doing wrong.
Can someone help me out?
Here is the DB error:
SQLSTATE[23503]: Foreign key violation: 7
ERROR: insert or update on table "agendas" violates foreign key constraint "agendas_audit_id_foreign"
DETAIL:
Key (audit_id)=(1) is not present in table "audits".
(Connection: pgsql)
SQL:
insert into "agendas"
("title", "description", "date_from", "date_to", "audit_id", "updated_at", "created_at")
values
('gfdsgfds', 'fsdgdsfgds', '2025-10-06 16:59:40', '2025-10-22 16:59:42', 1, '2025-10-01 14:59:45', '2025-10-01 14:59:45')
returning "id"