private function getSingleEntity($documentClass, $recordId, array $fields = null)
    {
        // only get certain fields! will not be cached in instance
        $queryBuilder = $this->dm->createQueryBuilder($documentClass);
        $queryBuilder->field('id')->equals($recordId);
        if (is_array($fields)) {
            $queryBuilder->select($fields);
        }
        $query = $queryBuilder->getQuery();
        $query->setRefresh(true);
        $records = array_values($query->execute()->toArray());

        if (is_array($records) && !empty($records)) {
            return json_decode($this->restUtils->serializeContent($records[0]));
        }

        return null;
    }