public function refresh(&$object)
    {
        if (!isset($this->objectsRepository[spl_object_hash($object)])) {
            return;
        }
        $repository = $this->objectsRepository[spl_object_hash($object)];
        $id = $repository->getHydrator()->unhydrate($object)["_id"];
        $projection = $repository->getLastProjection($object);
        $collection = $repository->getCollection();
        $hydrator = $repository->getHydrator();

        if (null !== ($data = $collection->findOne(['_id' => $id], ['projection' => $projection]))) {
            $hydrator->hydrate($object, $data);
            $repository->cacheObject($object);
        } else {
            $object = null;
        }
        return $object;
    }