Do not use foreign key in update statement

Fix #97