So I'm trying to follow symfony2's tutorial on doctrine for my own website and modeling my
use Doctrine\ORM\Mapping as ORM;
* @ORM\Column(type="string", length=100)
* @ORM\Column(type="string", length=64)
$ php app/console doctrine:generate:entities MySite/MyBundle/Entity/User
Class "MySite\MyBundle\Entity\User" is not a valid entity or mapped super class.
Ok, I figured it out myself. My problem is that my config.yml was wrong. I was missing the
auto_mapping: true line in my config.yml.
doctrine: # (dbal stuff here) orm: auto_generate_proxy_classes: "%kernel.debug%" auto_mapping: true
After adding that, everything auto-generates fine with the
php app/console doctrine:generate:entities MySite/MyBundle/Entity/User line