Home Documentation Download Pricing Buy Now
+4 votes

Generate Doctrine2 repository class skeleton in the same way as Symfony 2 task to generate entities does. Make this optional by adding a custom ORM attribute Generate repository class with true/false value.

If MVC framework is Symfony 2 and Generate repository class is set to true, class skeleton in the same namespace should be created. For a class Article in a namespace Acme\MyBundle\Entity a corresponding class should be created:

<?php

namespace Acme\MyBundle\Entity;

use Doctrine\ORM\EntityRepository;

class ArticleRepository extends EntityRepository
{
}

For other MVC frameworks this behavior should be configurable via XML configuration. With the ability to set the namespace and naming conventions.

Further Enhancement -
Ability to automatically generate @ORM\Entity(repositoryClass="XXX") for all entities inside specific module based on filled namespace and entity name.

in Feature Request by (550 points)
edited by

Please log in or register to answer this question.

...