update related foreignkey