Circular references in one transaction
Tables node_a and node_b reference each other with foreign keys (a cycle). You must insert a linked pair: node_a (1, 1) and node_b (1, 1). Inserting them one by one fails — the first row references a row that does not exist yet. Write a transaction that defers the foreign-key checks to the end and inserts both rows.
Přihlaste se, abyste viděli historii odevzdání
Přihlásit sePřihlaste se, abyste mohli použít AI mentora
Přihlásit se