I go with Symfony2 docs
. It’s said that adding
/** * @ORMEntity(repositoryClass="AcmeStoreBundleEntityProductRepository") */
in my entity file and running
php app/console doctrine:generate:entities Acme
should create the
file. It doesn’t. I can’t clarimy this more, it’s just doesnt create that file, just recreates those entity files that were there before.
I am having the same issue
But I’ve found the answer here: http://brentertainment.com/other/docs/book/doctrine/orm.html
If you have already generated your entity class before adding the repositoryClass mapping, you have to create the class on your own. Fortunately, it’s pretty easy. Simply create the class in the Repository directory of your bundle and be sure it extends DoctrineORMEntityRepository. Once you’ve created the class, you can add any method to query your entities.
Simple, we have to do it by hand because we have already run this once