Loading related records
Diagnose actual foreign-key failures, regenerated links and replacement effects.
Why did enabling foreign keys fail to protect this import?
Configure and inspect the connection setting before beginning the load transaction.
Why does an old orphan remain after foreign keys are enabled?
Inspect actual historical violations before releasing the loaded database.
Why does a child-first complete batch fail before its parent arrives?
Use the explicitly authorised deferred transaction and validate at commit.
Why did replacing a parent erase its imported child history?
Use an update for the intended existing-record change instead of replacement deletion.
Why did a migrated child link to an unrelated existing parent?
Translate source references through the actual allocated destination-key map.
Why did a valid later parent fail a one-pass load?
Allocate all supplied records before linking their references in one transaction.
Why did a half-filled composite reference pass its foreign key?
Enforce the supplied all-or-none link rule alongside the composite FK.
Why does a valid-looking child insert report foreign key mismatch?
Inspect the parent’s exact unique-key and collation definition before editing source values.