private function validateIdStrategy(EntityMetadata $metadata)
    {
        $persistence = $metadata->persistence;
        $validIdStrategies = ['object'];
        if (!in_array($persistence->idStrategy, $validIdStrategies)) {
            throw MetadataException::invalidMetadata($metadata->type, sprintf('The persistence id strategy "%s" is invalid. Valid types are "%s"', $persistence->idStrategy, implode('", "', $validIdStrategies)));
        }
    }