<?php

// Initialize Doctrine and $em
// ...

$q = $em->createQuery('SELECT c FROM Entity\Country c');
$q->iterate()->next();

$r = $em->createQuery('SELECT u FROM Entity\User u');
$r->iterate()->next(); // This line breaks


/*
PHP Fatal error:  Uncaught exception 'ReflectionException' with message 'Class  does not exist' in /home/kaiser/core/lib/Doctrine2/lib/Doctrine/ORM/Mapping/ClassMetadata.php:67
Stack trace:
#0 /home/kaiser/core/lib/Doctrine2/lib/Doctrine/ORM/Mapping/ClassMetadata.php(67): ReflectionClass->__construct(NULL)
#1 /home/kaiser/core/lib/Doctrine2/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php(284): Doctrine\ORM\Mapping\ClassMetadata->__construct(NULL)
#2 /home/kaiser/core/lib/Doctrine2/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php(210): Doctrine\ORM\Mapping\ClassMetadataFactory->_newClassMetadataInstance(NULL)
#3 /home/kaiser/core/lib/Doctrine2/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php(136): Doctrine\ORM\Mapping\ClassMetadataFactory->_loadMetadata(NULL)
#4 /home/kaiser/core/lib/Doctrine2/lib/Doctrine/ORM/EntityManager.php(181): Doctrine\ORM\Mapping\ClassMetadataFactory->getMetadataFor(NULL)
#5 /home/kaiser/core/lib/Doctrine2/lib/Doctrine/ORM/UnitOfWork.php(1717): Doctrine\ORM\EntityManager->getClassMetadata(NULL)
#6 / in /home/kaiser/core/lib/Doctrine2/lib/Doctrine/ORM/Mapping/ClassMetadata.php on line 67
*/