public function findAndUpdate(Operator $operator, $upsert = false, $returnUpdated = true)
    {
        $mongoDocument = $this->collection
            ->getMongoCollection()
            ->findAndModify(
                $this->expression->toArray(),
                $operator ? $operator->toArray() : null,
                $this->projection,
                array(
                    'new' => $returnUpdated,
                    'sort' => $this->sort,
                    'upsert' => $upsert,
                )
            );

        if (empty($mongoDocument)) {
            return null;
        }

        return $this->collection->hydrate($mongoDocument, $this->isDocumentPoolUsed());
    }