private function getUpdateChangeSetHandler()
    {
        return function ($key, $value, $obj) {
            $op = '$set';
            if (null === $value) {
                $op = '$unset';
                $value = 1;
            }
            $obj[$op][$key] = $value;
            return $obj;
        };
    }