remap nested pointers together when updating db