Update affectedRows when deleting or updating relations on save