module.config.php
'doctrine' => array(
'driver' => array(
'Application_driver' => array(
'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
'cache' => 'array',
'paths' => array(__DIR__ . '/../src/Application/Entities')
),
'orm_default' => array(
'drivers' => array(
'Application\Entities' => 'Application_driver'
),
),
),
),
Article.php
namespace Application\Entities;
use Doctrine\ORM\Mapping as ORM;
/**
* Article
*
* @ORM\Table(name="article", indexes={@ORM\Index(name="fk_article_gallery1", columns={"gallery_idgallery"}), @ORM\Index(name="fk_article_sf_guard_user1", columns={"sf_guard_user_id"})})
* @ORM\Entity(repositoryClass="Repositories\ArticleRepository")
*/
ArticleRepository.php位于Application \ Entities \ Repositories \
中我收到错误Fatal error: Class 'Repositories\ArticleRepository' not found
我尝试了多条路径,但它不起作用。
我不知道我做错了什么
我也试试
php ./vendor/doctrine/doctrine-module/bin/doctrine-module orm:generate-repositories ./module/Application/src/Application/Entities
它创建了Entities / Repositories / ArticleRepository.php,但我仍然收到错误