Giwi

0

votes
0

answer
2

views

GORM Zero-to-Many: Cannot add or update a child row: a foreign key constraint fails

I am new to Golang and Gorm. I want to parse API response and store two tables. For each "reports" table, there can be zero-to-many tables of "personal_details". However, gorm gave error when applying foreign key constraint because there's no record for PersonalDetail in API response sometimes. I...
Giwi