{"id":1662,"date":"2022-08-30T15:18:24","date_gmt":"2022-08-30T15:18:24","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/27\/doctrine2-reflectionexception-with-message-class-comment-does-not-exist-in-while-trying-use-doctrine-models-in-codeigniter-controller-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:18:24","modified_gmt":"2022-08-30T15:18:24","slug":"doctrine2-reflectionexception-with-message-class-comment-does-not-exist-in-while-trying-use-doctrine-models-in-codeigniter-controller-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/doctrine2-reflectionexception-with-message-class-comment-does-not-exist-in-while-trying-use-doctrine-models-in-codeigniter-controller-collection-of-common-programming-errors\/","title":{"rendered":"Doctrine2: ReflectionException&#39; with message &#39;Class Comment does not exist in &hellip;&#39; while trying use doctrine models in codeigniter controller-Collection of common programming errors"},"content":{"rendered":"<p>I got &#8220;Message: class_parents(): Class Comment does not exist and could not be loaded&#8221; while trying to use Doctrine models in CodeIgniter controller.<\/p>\n<p>Here is full stacktrace Fatal error: Uncaught exception &#8216;ReflectionException&#8217; with message &#8216;Class Comment does not exist&#8217; 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-&gt;__construct(&#8216;Comment&#8217;) #1 C:\\Users\\user\\Desktop\\projects\\interview\\application\\libraries\\Doctrine\\ORM\\Mapping\\ClassMetadataInfo.php(769): Doctrine\\Common\\Persistence\\Mapping\\RuntimeReflectionService-&gt;getClass(&#8216;Comment&#8217;) #2 C:\\Users\\user\\Desktop\\projects\\interview\\application\\libraries\\Doctrine\\ORM\\Mapping\\ClassMetadataFactory.php(591): Doctrine\\ORM\\Mapping\\ClassMetadataInfo-&gt;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-&gt;initializ in C:\\Users\\user\\Desktop\\projects\\interview\\application\\libraries\\Doctrine\\Common\\Persistence\\Mapping\\RuntimeReflectionService.php on line 73<\/p>\n<p>Here is my model in \/application\/models\/Entities\/Comment.php<\/p>\n<p id=\"rop\"><small>Originally posted 2013-11-27 12:25:53. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I got &#8220;Message: class_parents(): Class Comment does not exist and could not be loaded&#8221; while trying to use Doctrine models in CodeIgniter controller. Here is full stacktrace Fatal error: Uncaught exception &#8216;ReflectionException&#8217; with message &#8216;Class Comment does not exist&#8217; 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-&gt;__construct(&#8216;Comment&#8217;) #1 C:\\Users\\user\\Desktop\\projects\\interview\\application\\libraries\\Doctrine\\ORM\\Mapping\\ClassMetadataInfo.php(769): Doctrine\\Common\\Persistence\\Mapping\\RuntimeReflectionService-&gt;getClass(&#8216;Comment&#8217;) #2 C:\\Users\\user\\Desktop\\projects\\interview\\application\\libraries\\Doctrine\\ORM\\Mapping\\ClassMetadataFactory.php(591): Doctrine\\ORM\\Mapping\\ClassMetadataInfo-&gt;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-&gt;initializ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1662","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1662","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1662"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1662\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1662"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1662"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}