fix a bug, when update a record, the related counter field in reference table should update too