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.

gefragt vor 5 Jahren317 Aufrufe
1 Antwort
0

Sorry it was my mistake. Marking as answered :)

beantwortet vor 5 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen