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.
Connectez-vous pour voir l'historique des soumissions
Se connecterConnectez-vous pour utiliser le Mentor IA
Se connecter