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 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则