Why am I getting this exception
Doctrine \ ORM \ Mapping \ MappingException: identifier / primary key for Entity object "Entities \ Category" for class "". Each object must have an identifier / primary key. in /Users/munnik/Sites/doctrine/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/MappingException.php on line 38
for this class:
<?php namespace Entities; use Doctrine\ORM\Mapping as ORM; class Category { private $id; private $name; }
I just can not find the problem? @ORM \ Id should indicate $ id as primary key?
source share