Update the identity map after an insert or an update