When I run this command:
php app/console doctrine:generate:entities MyBundleName
All the setters and getters are generated correctly, except that it generates a .php file in my Entity directory
with the following content
<?php
namespace Goodeed\BEBundle\Entity;
use Doctrine\ORM\EntityRepository;
/**
*
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class extends EntityRepository
{
}
So if I run for example
php app/console doctrine:schema:update --force
I get this error:
I don't really care about the error because when I delete the file everything works as expected and no more errors arise. So my question is, what could cause the generation of this .php file?
My hypothesis would be that there is this kind of annotation in your Entity :
@ORM\Entity(repositoryClass="YourBundle\Entity\ ")
With this annotation, the command you prompted has this behaviour.
Hope this helps.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.