Updating function: collection.replace(cid, replobj)