Fields and columns are glued together by mappings - they don't need to correspond. You just need to ensure that the property "clientId" exists on the class, and the column "client_id" exists on the table.
Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 3 February 2014 13:29, Parsifal <[email protected]> wrote: > > My apolgies to Marco to post a new thread instead of under the same > thread, this is because under that another thread I asked about proxy and I > am waiting for the answer yet. > I was able to fix class not found. I see in entity file, there is > something like: > 'fieldName' => 'clientId', > 'columnName' => 'client_id', > Should I change field name to client_id that is actually my coloumn name? > or just adding > protected $clientId; > is enough to solve the problem below? > > > Fatal error: Uncaught exception 'ReflectionException' with message > 'Property Entities\clients::$clientId does not exist' in > /home2/edited/composer/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php:79 > > Stack trace: > > #0 > /home2/edited/composer/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php(79): > ReflectionProperty->__construct('Entities\client...', 'clientId') > > #1 > /home2/edited/composer/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php(889): > Doctrine\Common\Persistence\Mapping\RuntimeReflectionService->getAccessibleProperty('Entities\client...', > 'clientId') > > #2 > /home2/edited/composer/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php(537): > Doctrine\ORM\Mapping\ClassMetadataInfo->wakeupReflection(Object(Doctrine\Common\Persistence\Mapping\RuntimeReflectionService)) > > #3 > /home2/edited/composer/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php(329): > Doctrine\ in > /home2/edited/composer/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php > on line 79 > > -- > You received this message because you are subscribed to the Google Groups > "doctrine-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/doctrine-user. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/groups/opt_out.
