Hacked in foreign key constraint