I go with Symfony2 docs. It's said that adding
/**
* @ORM\Entity(repositoryClass="Acme\StoreBundle\Entity\ProductRepository")
*/
in my entity file and running php app/console doctrine:generate:entities Acme
should create the ProductRepository
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 Doctrine\ORM\EntityRepository. 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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With