Doctrine2: ReflectionException' with message 'Class Comment does not exist in …' while trying use doctrine models in codeigniter controller-Collection of common programming errors

I got “Message: class_parents(): Class Comment does not exist and could not be loaded” while trying to use Doctrine models in CodeIgniter controller.

Here is full stacktrace Fatal error: Uncaught exception ‘ReflectionException’ with message ‘Class Comment does not exist’ in C:\Users\user\Desktop\projects\interview\application\libraries\Doctrine\Common\Persistence\Mapping\RuntimeReflectionService.php:73 Stack trace: #0 C:\Users\user\Desktop\projects\interview\application\libraries\Doctrine\Common\Persistence\Mapping\RuntimeReflectionService.php(73): ReflectionClass->__construct(‘Comment’) #1 C:\Users\user\Desktop\projects\interview\application\libraries\Doctrine\ORM\Mapping\ClassMetadataInfo.php(769): Doctrine\Common\Persistence\Mapping\RuntimeReflectionService->getClass(‘Comment’) #2 C:\Users\user\Desktop\projects\interview\application\libraries\Doctrine\ORM\Mapping\ClassMetadataFactory.php(591): Doctrine\ORM\Mapping\ClassMetadataInfo->initializeReflection(Object(Doctrine\Common\Persistence\Mapping\RuntimeReflectionService)) #3 C:\Users\user\Desktop\projects\interview\application\libraries\Doctrine\ORM\Mapping\ClassMetadataFactory.php(272): Doctrine\ORM\Mapping\ClassMetadataFactory->initializ in C:\Users\user\Desktop\projects\interview\application\libraries\Doctrine\Common\Persistence\Mapping\RuntimeReflectionService.php on line 73

Here is my model in /application/models/Entities/Comment.php

Originally posted 2013-11-27 12:25:53.