public function addNamedNativeQueryResultClassMapping(ClassMetadataInfo $class, $resultClassName)
    {
        $classMetadata  = $this->em->getClassMetadata($resultClassName);
        $shortName      = $classMetadata->reflClass->getShortName();
        $alias          = strtolower($shortName[0]).'0';

        $this->addEntityResult($class->name, $alias);

        if ($classMetadata->discriminatorColumn) {
            $discriminatorColumn = $classMetadata->discriminatorColumn;
            $this->setDiscriminatorColumn($alias, $discriminatorColumn['name']);
            $this->addMetaResult($alias, $discriminatorColumn['name'], $discriminatorColumn['fieldName']);
        }

        foreach ($classMetadata->getColumnNames() as $key => $columnName) {
            $propertyName   = $classMetadata->getFieldName($columnName);
            $this->addFieldResult($alias, $columnName, $propertyName);
        }

        foreach ($classMetadata->associationMappings as $associationMapping) {
            if ($associationMapping['isOwningSide'] && $associationMapping['type'] & ClassMetadataInfo::TO_ONE) {
                foreach ($associationMapping['joinColumns'] as $joinColumn) {
                    $columnName = $joinColumn['name'];
                    $this->addMetaResult($alias, $columnName, $columnName, $classMetadata->isIdentifier($columnName));
                }
            }
        }

        return $this;
    }