Problem inserting in Aurora Serverless (via Data API) with foreign key

0

I'm using Aurora Serverless with Data API (AWS.RDSDataService class for node.js).
When I'm trying to insert two related (one-to-many) records in a single transaction I'm getting "Cannot add or update a child row: a foreign key constraint fails".
I'm sure I'm doing it in a single transaction and parent record is inserted first. But it looks like it's not there when I insert child record.

已提問 5 年前檢視次數 317 次
1 個回答
0

Sorry it was my mistake. Marking as answered :)

已回答 5 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南