src/EntityRepository.php
public function find($id, array $queryParams = []): ?object
    {
        $hydrator = $this->sdk->getModelHydrator();
        $id = $hydrator->convertId($id, $this->entityName);

        $id = $this->addQueryParameter($id, $queryParams);

        // if entity is found in cache, return it
        $entityFromCache = $this->fetchFromCache($id);
        if (false != $entityFromCache) {
            return $entityFromCache;
        }

        $data = $this->restClient->get($id);
        $data = $this->assertNotObject($data, __METHOD__);

        $entity = $hydrator->hydrate($data, $this->entityName);

        // cache entity
        $this->saveToCache($id, $entity);
        if (null !== $entity) {
            $this->unitOfWork->registerClean($id, $entity); // another register clean will be made in the Serializer if the id different from the called uri
        }

        return $entity;
    }
public function find($id, array $queryParams = []): ?object
    {
        $hydrator = $this->sdk->getModelHydrator();
        $id = $hydrator->convertId($id, $this->entityName);

        $id = $this->addQueryParameter($id, $queryParams);

        // if entity is found in cache, return it
        $entityFromCache = $this->fetchFromCache($id);
        if (false != $entityFromCache) {
            return $entityFromCache;
        }

        $data = $this->restClient->get($id);
        $data = $this->assertNotObject($data, __METHOD__);

        $entity = $hydrator->hydrate($data, $this->entityName);

        // cache entity
        $this->saveToCache($id, $entity);
        if (null !== $entity) {
            $this->unitOfWork->registerClean($id, $entity); // another register clean will be made in the Serializer if the id different from the called uri
        }

        return $entity;
    }
find - finds one item of the entity based on the @REST\Id field in the entity

@param string|int|mixed $id          id of the element to fetch
@param array  $queryParams query parameters to add to the query