Ensure that a foreign key is always set.