I
I
Ivan Antonov2015-01-21 17:07:25
symfony
Ivan Antonov, 2015-01-21 17:07:25

Symfony2+Doctrine2 why is the repository not created?

the doctrine:generate:entities command does not create a repository.
I describe the actions
I generate an XML description for the existing database:

php app/console doctrine:mapping:import --force AppBundle xml

I create entities using annotations:
php app/console doctrine:mapping:convert annotation ./src

I add an annotation about the repository to the OffersCategories entity :
/**
 * ...
 * @ORM\Entity(repositoryClass="AppBundle\Entity\OffersCategoriesRepository")
 */
class OffersCategories { /**/ }

I save and form getters and seters:
php app/console doctrine:generate:entities AppBundle

Eventually:
  1. The OffersCategoriesRepository class is not generated.
  2. I create manually - also no effect.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Antonov, 2015-01-22
@antonowano

I did not find out the reason, I solved the problem by adding a description of the repository to the xml file.
Having executed the command to create entities, everything worked.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question