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.

asked 5 years ago312 views
1 Answer
0

Sorry it was my mistake. Marking as answered :)

answered 5 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions